Merge branch 'Feature/Main/Header' into Upload/Dad-mehr

This commit is contained in:
MahanCh
2025-04-13 22:55:04 +03:30
30 changed files with 2071 additions and 1162 deletions

View File

@@ -9,4 +9,6 @@ public class RollCallTimeViewModel
public TimeSpan TotalHours { get; set; }
public DateTime StartDateGr { get; set; }
public DateTime EndDateGr { get; set; }
public string EntryTimeDifferences { get; set; }
public string ExitTimeDifferences { get; set; }
}

View File

@@ -528,9 +528,9 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
if (employeeRollCallStatuses == null || employeeRollCallStatuses.EmployeesStatus == null || !employeeRollCallStatuses.EmployeesStatus.Any())
return new();
//this list will have all the months which employee was active in, remember this doesn't have statuses,
//just the list of months which user had activity in
var activeMonths = new List<PersianDateTime>();
//this list will have all the months which employee was active in, remember this doesn't have statuses,
//just the list of months which user had activity in
var activeMonths = new List<PersianDateTime>();
//filling the list
foreach (var status in employeeRollCallStatuses.EmployeesStatus)
@@ -562,10 +562,10 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
//get the months that include these dates
activeMonthsList = activeMonthsList.Where(x => x.Year >= startSearch.Year && x.Month >= startSearch.Month && x.Year <= endSearch.Year && x.Month <= endSearch.Month).ToList();
}
//if exact datetime is given start and end will be the same date
//if exact datetime is given start and end will be the same date
if (exactDateTime.HasValue)
{
startSearch = new PersianDateTime(exactDateTime.Value);
startSearch = new PersianDateTime(exactDateTime.Value);
endSearch = startSearch;
activeMonthsList = activeMonthsList.Where(x => x.Year >= startSearch.Year && x.Month >= startSearch.Month && x.Year <= endSearch.Year && x.Month <= endSearch.Month).ToList();
}
@@ -575,8 +575,8 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
{
var persianDateIndex = new PersianDateTime(dateIndex.Value);
//gets first of month, if the day is 21st of month, first of month is 21-21 +1 = 1 or 21 + (-(21-1)) = 1
var dateIndexFirstOfMonth = persianDateIndex.AddDays(-(persianDateIndex.Day - 1));
//gets first of month, if the day is 21st of month, first of month is 21-21 +1 = 1 or 21 + (-(21-1)) = 1
var dateIndexFirstOfMonth = persianDateIndex.AddDays(-(persianDateIndex.Day - 1));
activeMonthsList = activeMonthsList.Where(x => dateIndexFirstOfMonth >= x).ToList();
}
@@ -594,7 +594,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
x.StartDate < nextMonthFirstDay);
//get leaves in the specified month
//get leaves in the specified month
var leavesQuery =
_context.LeaveList.Where(x => (x.LeaveType == "استعلاجی" || (x.LeaveType == "استحقاقی" && x.PaidLeaveType == "روزانه")) &&
x.IsAccepted &&
@@ -653,7 +653,9 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
StartDate = y.StartDate.Value.ToString("HH:mm"),
EndDate = y.EndDate!.Value.ToString("HH:mm"),
StartDateGr = y.StartDate.Value,
EndDateGr = y.EndDate.Value
EndDateGr = y.EndDate.Value,
EntryTimeDifferences = CalculateEntryTimeDifferences(y.EarlyEntryDuration, y.LateEntryDuration),
ExitTimeDifferences = CalculateExitTimeDifferences(y.EarlyExitDuration, y.LateExitDuration)
}),
TotalWorkingHoursSpan = new TimeSpan(rollCallsList.Where(y => x.Date == y.ShiftDate.Date)
.Sum(y => (y.EndDate!.Value - y.StartDate.Value).Ticks)),
@@ -662,26 +664,26 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
};
});
//filling TotalWorkingHours string from TimeSpans we filled in the last step and other info
result = result.Select(x => new RollCallViewModel()
//filling TotalWorkingHours string from TimeSpans we filled in the last step and other info
result = result.Select(x => new RollCallViewModel()
{
EmployeeFullName = employeeName.EmployeeFullName,
EmployeeId = employeeId,
PersonnelCode = personnelCode.ToString(),
DateGr = x.DateGr,
DateFa = x.DateFa,
DayOfWeekFa = x.DateGr.DayOfWeek.DayOfWeeKToPersian(),
IsHoliday = _holidayItemApplication.IsHoliday(x.DateGr),
IsAbsent = !x.RollCallTimesList.Any(),
RollCallTimesList = x.RollCallTimesList.OrderBy(r=>r.StartDateGr),
RollCallTimesList = x.RollCallTimesList.OrderBy(r => r.StartDateGr),
HasLeave = x.HasLeave,
TotalWorkingHoursSpan = x.TotalWorkingHoursSpan,
TotalWorkingHours = $"{(int)x.TotalWorkingHoursSpan.TotalHours}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}"
}).ToList();
//total working hours in the whole month or duration
var totalWorkingHours = new TimeSpan(result.Sum(x => x.TotalWorkingHoursSpan.Ticks));
var totalWorkingHours = new TimeSpan(result.Sum(x => x.TotalWorkingHoursSpan.Ticks));
//if there are any other months available that the selector
return new EmployeeRollCallsByMonthViewModel()
@@ -847,10 +849,12 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
EmployeeFullName = x.EmployeeFullName,
EmployeeId = x.EmployeeId,
Reason = leave == null ? "" : $"{leave.LeaveType}-{leave.PaidLeaveType}",
RollCallTimesList = employeeRollCallsForDate.OrderBy(r=>r.StartDate).Select(y => new RollCallTimeViewModel()
RollCallTimesList = employeeRollCallsForDate.OrderBy(r => r.StartDate).Select(y => new RollCallTimeViewModel()
{
EndDate = y.EndDate!.Value.ToString("HH:mm"),
StartDate = y.StartDate!.Value.ToString("HH:mm"),
EntryTimeDifferences = CalculateEntryTimeDifferences(y.EarlyEntryDuration, y.LateEntryDuration),
ExitTimeDifferences = CalculateExitTimeDifferences(y.EarlyExitDuration, y.LateExitDuration)
}),
HasLeave = leave != null,
IsAbsent = !employeeRollCallsForDate.Any(),
@@ -1081,10 +1085,13 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
EmployeeFullName = nameReferences.FirstOrDefault(y => x.Key == y.EmployeeId).EmployeeFullName,
EmployeeId = x.FirstOrDefault()!.EmployeeId,
TotalWorkingHoursSpan = new TimeSpan(x.Where(y => y.EndDate != null).Sum(y => (y.EndDate!.Value - y.StartDate!.Value).Ticks)),
RollCallTimesList = x.Select(y => new RollCallTimeViewModel()
RollCallTimesList = x.OrderBy(r => r.StartDate).Select(y => new RollCallTimeViewModel()
{
StartDate = y.StartDate!.Value.ToString("HH:mm"),
EndDate = y.EndDate?.ToString("HH:mm")
EndDate = y.EndDate?.ToString("HH:mm"),
EntryTimeDifferences = CalculateEntryTimeDifferences(y.EarlyEntryDuration, y.LateEntryDuration),
ExitTimeDifferences = CalculateExitTimeDifferences(y.EarlyExitDuration, y.LateExitDuration)
}).ToList()

View File

@@ -442,6 +442,16 @@
top: -3px;
z-index: 4;
}
.modal-dialog {
max-width: 1140px;
margin: 2rem auto;
}
.modal-xxl {
max-width: 1140px;
--bs-modal-width: 1140px;
}
</style>
<div class="modal-body p-0 d-flex justify-content-center">

View File

@@ -203,6 +203,10 @@
var antiForgeryToken = $('@Html.AntiForgeryToken()').val();
var loadCameraAccountsAjax = `@Url.Page("CameraAccounts", "CameraAccounts")`;
var changeCameraAccountStatusAjax = `@Url.Page("./CameraAccounts", "CameraAccountChangeStatus")`;
// check and show modal Camera Account And Workshop Setting
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("./Index", "StatusCameraAccountAndWorkshopSetting")`;
var saveCameraAccountUrl = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
<script src="~/assetsclient/pages/RollCall/js/CameraAccounts.js?ver=@clientVersion"></script>
}

View File

@@ -169,8 +169,8 @@
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<ul class="dropdown-normal dropdown-days boxes">
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
<li class="item active" data-value-normal="one-day">تاریخ براساس یک روز</li>
<li class="item" data-value-normal="range-days">تاریخ براساس بازه ی زمانی</li>
</ul>
</div>
</div>
@@ -328,8 +328,8 @@
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
<ul class="dropdown-normal dropdown-days boxes">
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
<li class="item active" data-value-normal="one-day">تاریخ براساس یک روز</li>
<li class="item" data-value-normal="range-days">تاریخ براساس بازه ی زمانی</li>
</ul>
</div>
@@ -407,6 +407,10 @@
// var dateIndex = 0;
var deleteRollCallData = `@Url.Page("./CaseHistory", "RemoveEmployeeRollCallsInDate")`;
// check and show modal Camera Account And Workshop Setting
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("./Index", "StatusCameraAccountAndWorkshopSetting")`;
var saveCameraAccountUrl = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/casehistory.js?ver=@clientVersion"></script>
}

View File

@@ -4,6 +4,8 @@
@{
ViewData["Title"] = " - " + "لیست حضور و غیاب جاری";
string clientVersion = _0_Framework.Application.Version.StyleVersion;
int index = 1;
int indexAbsent = 1;
int indexLeave = 1;
@@ -11,15 +13,15 @@
}
@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/rollcall-list-table.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.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=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/css/rollcall-list-table.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/css/operation-button.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/dropdown.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/filter-search.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/assetsclient/pages/rollcall/css/currentday.css" rel="stylesheet" />
<link href="~/assetsclient/pages/rollcall/css/currentday.css?ver=@clientVersion" rel="stylesheet" />
}
@@ -45,22 +47,22 @@
</div>
</div>
<div class="container-fluid">
<div class="row px-2">
<div class="col-12 p-0 mb-2 d-none d-md-block">
<div class="search-box card border-0">
<div class="d-flex align-items-center gap-2">
<div class="container-fluid">
<div class="row px-2">
<div class="col-12 p-0 mb-2 d-none d-md-block">
<div class="search-box card border-0">
<div class="d-flex align-items-center gap-2">
<div class="col-2 position-relative">
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
<button type="button" id="clear-search" class="close-btn-search d-none">
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg>
</button>
</div>
<div class="col-2 position-relative">
<input type="text" class="form-control" id="search" placeholder="جستجو ...">
<button type="button" id="clear-search" class="close-btn-search d-none">
<svg width="20" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12" />
</svg>
</button>
</div>
@* <button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
@* <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" />
@@ -70,281 +72,6 @@
<a asp-page="/Company/RollCall/CaseHistory" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove" style="padding: 7px 10px;">
<span>حذف جستجو</span>
</a> *@
</div>
</div>
</div>
</div>
</div>
<!-- List Items -->
<div class="container-fluid">
<div class="row">
<div class="widthRightCurrentDay ps-0 d-none d-md-block">
<div class="card heightRightCurrentDay">
<div class="wrapper table-rollcall">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky" style="outline: 6px solid white !important;">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
<div class="Rtable-cell column-heading width4 text-end">تاخیر در ورود</div>
<div class="Rtable-cell column-heading width5 text-center">ورود</div>
<div class="Rtable-cell column-heading width6 text-center">خروج</div>
<div class="Rtable-cell column-heading width7 text-start">تجمیع در خروج</div>
<div class="Rtable-cell column-heading width8 text-center">مجموع ساعات کاری</div>
</div>
@if (@Model.RollCallViewModels.PresentEmployees.Any())
{
@foreach (var item in Model.RollCallViewModels.PresentEmployees)
{
<div class="Rtable-row align-items-center position-relative openAction employee-row @(Model.RollCallViewModels.PresentEmployees.Count() == 1 ? "radius" : "") @(index == 1 ? "firstRadius" : "") @(index == Model.RollCallViewModels.PresentEmployees.Count() ? "lastRadius" : "" ) @(item.RollCallTimesList.Last().EndDate != null ? "existTimeRollCall" : "")">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(index++)
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content employee-name">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4 position-relative bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تاخیر در ورود: </div>
<div class="d-flex ms-1">-</div>
</div>
</div>
<div class="Rtable-cell width5 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت ورود</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.StartDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell width6 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت خروج</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.EndDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell position-relative width7 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تجمیع در خروج: </div>
<div class="d-flex ms-1">-</div>
</div>
</div>
<div class="Rtable-cell position-relative width8 h-100 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
<div class="d-flex ms-1">
@if (item.RollCallTimesList.Last().EndDate == null)
{
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 12L18.1254 16.1694C18.6725 16.5418 19 17.1608 19 17.8227V20.5C19 20.7761 18.7761 21 18.5 21H5.5C5.22386 21 5 20.7761 5 20.5V17.8227C5 17.1608 5.32746 16.5418 5.87462 16.1694L12 12ZM12 12L18.1254 7.83062C18.6725 7.45819 19 6.83917 19 6.17729V3.5C19 3.22386 18.7761 3 18.5 3H5.5C5.22386 3 5 3.22386 5 3.5V6.17729C5 6.83917 5.32746 7.45819 5.87462 7.83062L12 12Z" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
<path d="M15 20.2071V20.85C15 20.9328 14.9328 21 14.85 21H9.15C9.06716 21 9 20.9328 9 20.85V20.2071C9 20.0745 9.05268 19.9473 9.14645 19.8536L11.4343 17.5657C11.7467 17.2533 12.2533 17.2533 12.5657 17.5657L14.8536 19.8536C14.9473 19.9473 15 20.0745 15 20.2071Z" fill="#13AEAE" />
<path d="M12 11L17 8H7L12 11Z" fill="#13AEAE" />
<path d="M12 18V12" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
}
else
{
@item.TotalWorkingHours
}
</div>
</div>
</div>
</div>
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
@* <div class="w-100" style="height: 731px; overflow-y: scroll">
<div></div>
</div> *@
</div>
</div>
</div>
</div>
<div class="widthLeftCurrentDay ps-0 d-none d-md-block">
<div class="row p-0 g-3">
<div class="col-12">
<div class="card">
<div class="wrapper">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
</div>
</div>
<div class="w-100 heightLeftCurrentDay">
<div></div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => !x.HasLeave))
{
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
{
if (!item.HasLeave)
{
<div class="Rtable-row align-items-center position-relative table-rollcall-absent absenceItem absenceItem-row">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexAbsent++)
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content employee-name">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
</div>
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="card">
<div class="wrapper">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="leaveHeadColorTop" style="border-radius: 10px 10px 0 0;">مرخصی</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-leave leaveHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
<div class="Rtable-cell column-heading width4 text-center">نوع مرخصی</div>
</div>
</div>
<div class="w-100 heightLeftCurrentDay">
<div></div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => x.HasLeave))
{
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
{
if (item.HasLeave)
{
<div class="Rtable-row align-items-center position-relative table-rollcall-leave leaveItem leaveItem-row">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexLeave++)
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content employee-name">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none"></div>
<div class="d-flex ms-1">@item.Reason</div>
</div>
</div>
</div>
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row p-lg-2 d-block d-md-none">
<div class="card pt-2">
<div class="col-12">
<div class="btnsRollCallOnlline">
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
</div>
</div>
<div class="wrapper">
<div class="rollcall-list-mobile Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100" id="loadRollCallTypeAjax">
</div>
</div>
</div>
</div>
</div>
@@ -352,12 +79,328 @@
</div>
</div>
<!-- List Items -->
<div class="container-fluid">
<div class="row">
<div class="widthRightCurrentDay ps-0 d-none d-md-block">
<div class="card heightRightCurrentDay">
<div class="wrapper table-rollcall">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky" style="outline: 6px solid white !important;">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
<div class="Rtable-cell column-heading width4 text-end">تاخیر در ورود</div>
<div class="Rtable-cell column-heading width5 text-center">ورود</div>
<div class="Rtable-cell column-heading width6 text-center">خروج</div>
<div class="Rtable-cell column-heading width7 text-start">تعجیل در خروج</div>
<div class="Rtable-cell column-heading width8 text-center">مجموع ساعات کاری</div>
</div>
@if (@Model.RollCallViewModels.PresentEmployees.Any())
{
@foreach (var item in Model.RollCallViewModels.PresentEmployees)
{
<div class="Rtable-row align-items-center position-relative openAction employee-row @(Model.RollCallViewModels.PresentEmployees.Count() == 1 ? "radius" : "") @(index == 1 ? "firstRadius" : "") @(index == Model.RollCallViewModels.PresentEmployees.Count() ? "lastRadius" : "" ) @(item.RollCallTimesList.Last().EndDate != null ? "existTimeRollCall" : "")">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(index++)
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content employee-name">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4 position-relative bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تاخیر در ورود: </div>
<div class="d-block ms-1">
@foreach (var itemTime in item.RollCallTimesList)
{
string entryTimeDiff = string.IsNullOrEmpty(itemTime.EntryTimeDifferences) ? "-" : itemTime.EntryTimeDifferences;
string entryCssClass = entryTimeDiff != "-" && entryTimeDiff.Contains("-") ? "negative-time" :
entryTimeDiff != "-" && entryTimeDiff.Contains("+") ? "positive-time" : "";
if (entryTimeDiff != "-")
{
entryTimeDiff = entryTimeDiff.TrimEnd('+', '-');
}
<div class="Rtable-cell--content text-center @entryCssClass">@entryTimeDiff</div>
}
</div>
</div>
</div>
<div class="Rtable-cell width5 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت ورود</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.StartDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell width6 position-relative text-center">
@foreach (var itemTime in item.RollCallTimesList)
{
<div class="Rtable-cell--heading">ساعت خروج</div>
<div style="direction: ltr; z-index: 6; position: relative" class="Rtable-cell--content text-center">
<div>@(itemTime.EndDate ?? "-")</div>
</div>
}
</div>
<div class="Rtable-cell position-relative width7 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">تعجیل در خروج: </div>
<div class="d-block ms-1">
@foreach (var itemTime in item.RollCallTimesList)
{
string exitTimeDiff = string.IsNullOrEmpty(itemTime.ExitTimeDifferences) ? "-" : itemTime.ExitTimeDifferences;
string exitCssClass = exitTimeDiff != "-" && exitTimeDiff.Contains("-") ? "negative-time" :
exitTimeDiff != "-" && exitTimeDiff.Contains("+") ? "positive-time" : "";
if (exitTimeDiff != "-")
{
exitTimeDiff = exitTimeDiff.TrimEnd('+', '-');
}
<div class="Rtable-cell--content text-center @exitCssClass">@exitTimeDiff</div>
}
</div>
</div>
</div>
<div class="Rtable-cell position-relative width8 h-100 bg-filter">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">مجموع ساعات کاری: </div>
<div class="d-flex ms-1">
@if (item.RollCallTimesList.Last().EndDate == null)
{
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 12L18.1254 16.1694C18.6725 16.5418 19 17.1608 19 17.8227V20.5C19 20.7761 18.7761 21 18.5 21H5.5C5.22386 21 5 20.7761 5 20.5V17.8227C5 17.1608 5.32746 16.5418 5.87462 16.1694L12 12ZM12 12L18.1254 7.83062C18.6725 7.45819 19 6.83917 19 6.17729V3.5C19 3.22386 18.7761 3 18.5 3H5.5C5.22386 3 5 3.22386 5 3.5V6.17729C5 6.83917 5.32746 7.45819 5.87462 7.83062L12 12Z" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
<path d="M15 20.2071V20.85C15 20.9328 14.9328 21 14.85 21H9.15C9.06716 21 9 20.9328 9 20.85V20.2071C9 20.0745 9.05268 19.9473 9.14645 19.8536L11.4343 17.5657C11.7467 17.2533 12.2533 17.2533 12.5657 17.5657L14.8536 19.8536C14.9473 19.9473 15 20.0745 15 20.2071Z" fill="#13AEAE" />
<path d="M12 11L17 8H7L12 11Z" fill="#13AEAE" />
<path d="M12 18V12" stroke="#13AEAE" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
}
else
{
@item.TotalWorkingHours
}
</div>
</div>
</div>
</div>
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
@* <div class="w-100" style="height: 731px; overflow-y: scroll">
<div></div>
</div> *@
</div>
</div>
</div>
</div>
<div class="widthLeftCurrentDay ps-0 d-none d-md-block">
<div class="row p-0 g-3">
<div class="col-12">
<div class="card">
<div class="wrapper">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
</div>
</div>
<div class="w-100 heightLeftCurrentDay">
<div></div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => !x.HasLeave))
{
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
{
if (!item.HasLeave)
{
<div class="Rtable-row align-items-center position-relative table-rollcall-absent absenceItem absenceItem-row">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexAbsent++)
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content employee-name">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
</div>
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>
</div>
<div class="col-12">
<div class="card">
<div class="wrapper">
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="leaveHeadColorTop" style="border-radius: 10px 10px 0 0;">مرخصی</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-leave leaveHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
<div class="Rtable-cell column-heading width4 text-center">نوع مرخصی</div>
</div>
</div>
<div class="w-100 heightLeftCurrentDay">
<div></div>
@if (@Model.RollCallViewModels.AbsentEmployees.Any(x => x.HasLeave))
{
@foreach (var item in Model.RollCallViewModels.AbsentEmployees)
{
if (item.HasLeave)
{
<div class="Rtable-row align-items-center position-relative table-rollcall-leave leaveItem leaveItem-row">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
</div>
<div class="Rtable-cell--content">
<div class="d-flex justify-content-center align-items-center table-number">
@(indexLeave++)
</div>
</div>
</div>
<div class="Rtable-cell width2">
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
<div class="Rtable-cell--content employee-name">
@item.EmployeeFullName
</div>
</div>
<div class="Rtable-cell width3">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none">شماره پرسنلی: </div>
<div class="d-flex ms-1">@item.PersonnelCode</div>
</div>
</div>
<div class="Rtable-cell width4">
<div class="Rtable-cell--content text-center">
<div class="d-md-none d-none"></div>
<div class="d-flex ms-1">@item.Reason</div>
</div>
</div>
</div>
}
}
}
else
{
<partial name="Company/Partial/_EmptySection"></partial>
}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row p-lg-2 d-block d-md-none">
<div class="card pt-2">
<div class="col-12">
<div class="btnsRollCallOnlline">
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
</div>
</div>
<div class="wrapper">
<div class="rollcall-list-mobile Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100" id="loadRollCallTypeAjax">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" aria-hidden="true" tabindex="-1" data-bs-backdrop="static" style="display: none;">
<div class="modal-dialog modal-md modalRollCallWidth modal-dialog-centered">
<div class="modal-content" id="ModalContent">
</div>
</div>
</div>
@section Script {
<script src="~/AssetsClient/js/dropdown.js?ver=@Version.StyleVersion"></script>
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
<script src="~/AssetsClient/js/dropdown.js?ver=@clientVersion"></script>
<script>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var loadRollCallMoreAjax = "@Url.Page("./CurrentDay", "CurrentDayAjax")";
var loadRollCallAbsentLeaveCountAjax = "@Url.Page("./CurrentDay", "CurrentAjaxCount")";
// check and show modal Camera Account And Workshop Setting
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("./Index", "StatusCameraAccountAndWorkshopSetting")`;
var saveCameraAccountUrl = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/currentday.js?ver=1235456"></script>
<script src="~/assetsclient/pages/rollcall/js/currentday.js?ver=@clientVersion"></script>
}

View File

@@ -200,6 +200,9 @@
var deActivePersonnelAjax = `@Url.Page("./EmployeeUploadPicture", "DeActivePersonnel")`;
var activePersonnelAjax = `@Url.Page("./EmployeeUploadPicture", "ActivePersonnel")`;
// check and show modal Camera Account And Workshop Setting
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("./Index", "StatusCameraAccountAndWorkshopSetting")`;
var saveCameraAccountUrl = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/employeeuploadpicture.js?ver=@clientVersion"></script>
}

View File

@@ -161,6 +161,10 @@
var workshopSettingId = Number((@Model.RollCallWorkshopSettings.Id));
var isShiftChangedGlobal = false;
var titleOfGroup = "";
// check and show modal Camera Account And Workshop Setting
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("./Index", "StatusCameraAccountAndWorkshopSetting")`;
var saveCameraAccountUrl = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
<script src="~/assetsclient/pages/rollcall/js/grouping.js?ver=@clientVersion"></script>
}

View File

@@ -307,16 +307,16 @@
</div>
</div>
<script>
var hasRollCallService = @(Model.CheckRollCallService == true ? "true" : "false");
var hasCameraAccount = @Model.HasCameraAccount;
var hasRollCallWorkshopSetting = @Model.HasRollCallWorkshopSetting;
var saveCameraAccountUrl = `#showmodal=@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
@section Script {
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
<script src="~/assetsclient/pages/rollcall/js/index.js"></script>
<script>
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
var hasRollCallService = @(Model.CheckRollCallService == true ? "true" : "false");
var hasCameraAccount = @Model.HasCameraAccount;
var hasRollCallWorkshopSetting = @Model.HasRollCallWorkshopSetting;
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("./Index", "StatusCameraAccountAndWorkshopSetting")`;
var saveCameraAccountUrl = `@Url.Page("./Index", "SaveCameraAccountAndWorkshopSetting")`;
</script>
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
<script src="~/assetsclient/pages/rollcall/js/index.js?ver=@clientVersion"></script>
}

View File

@@ -60,10 +60,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
var rollCallWorkshopSetting = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopId(workshopId, account);
HasRollCallWorkshopSetting = rollCallWorkshopSetting.ArePropertiesEqual(new CustomizeWorkshopSettingsViewModel()) ? "false" : "true";
var workshopInfo = _workshopApplication.GetWorkshopInfo(workshopId);
WorkshopFullName = _authHelper.GetWorkshopName();
WorkshopFullName =_authHelper.GetWorkshopName();
HasRollCallCustomizeWorkshopSetting = _customizeWorkshopSettingsApplication.GetWorkshopSettingsDetails(workshopId).Id == 0 ? "false" : "true";
HasRollCallCustomizeWorkshopSetting = _customizeWorkshopSettingsApplication.GetWorkshopSettingsDetails(workshopId).Id == 0 ? "false" : "true";
var hasBeforeService = _rollCallServiceApplication.GetAllServiceByWorkshopId(workshopId).Any();
var rollCall = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
@@ -90,7 +89,46 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
return Page();
}
public IActionResult OnGetSaveCameraAccountAndWorkshopSetting()
public IActionResult OnGetStatusCameraAccountAndWorkshopSetting()
{
var account = _authHelper.CurrentAccountInfo();
var workshopSlug = User.FindFirstValue("WorkshopSlug");
var workshopId = _passwordHasher.SlugDecrypt(workshopSlug);
if (workshopId < 0)
return BadRequest();
var workshopSettings = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopId(workshopId, account);
var hasRollCallWorkshopSetting = !workshopSettings.ArePropertiesEqual(new CustomizeWorkshopSettingsViewModel());
var allServices = _rollCallServiceApplication.GetAllServiceByWorkshopId(workshopId);
var hasPreviousService = allServices.Any();
var activeService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
var hasRollCallService = activeService != null;
bool hasCameraAccount;
if (hasRollCallService)
{
var accountId = _authHelper.CurrentAccountId();
var cameraAccountExists = _cameraAccountApplication.HasCameraAccount(workshopId, accountId);
hasCameraAccount = cameraAccountExists && hasPreviousService;
}
else
{
hasCameraAccount = !hasPreviousService;
}
return new JsonResult(new
{
hasRollCallWorkshopSetting,
hasCameraAccount,
hasRollCallService
});
}
public IActionResult OnGetSaveCameraAccountAndWorkshopSetting()
{
var account = _authHelper.CurrentAccountInfo();

View File

@@ -5,6 +5,29 @@
string clientVersion = _0_Framework.Application.Version.StyleVersion;
<link rel="stylesheet" href="~/AssetsClient/css/rollcall-package.css">
<link href="~/assetsclient/pages/rollcall/css/modalcreateaccountsetting.css?ver=@clientVersion" rel="stylesheet" />
<style>
.modal-dialog, .modal-content {
position: absolute;
left: 50%;
top: 50%;
-moz-transform: translate(-50%, -50%) !important;
-webkit-transform: translate(-50%, -50%) !important;
-o-transform: translate(-50%, -50%) !important;
transform: translate(-50%, -50%) !important;
width: 510px;
margin: 0;
}
.modal-dialog {
max-width: 500px;
margin: 2rem auto;
}
.modal-xxl {
max-width: 500px;
--bs-modal-width: 500px;
}
</style>
}
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">

View File

@@ -200,7 +200,7 @@
<div class="container m-0">
<div class="row">
<div class="col-6 text-end">
<button type="button" class="btn-cancel2 justify-content-center w-100" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
<button type="button" class="btn-cancel2 d-flex justify-content-center w-100" data-bs-dismiss="modal" aria-label="Close">انصراف</button>
</div>
<div class="col-6 text-start">
@* <button type="button" onclick="actionForShowModalReplaceChange()" class="btn-register w-100">ثبت</button> *@

View File

@@ -13,6 +13,17 @@
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
<link href="~/assetsclient/workshop/css/contractcheckoutyearlystatus.css" rel="stylesheet" />
<style>
.modal-dialog {
max-width: 1140px;
margin: 2rem auto;
}
.modal-xxl {
max-width: 1140px;
--bs-modal-width: 1140px;
}
</style>
}

View File

@@ -5,6 +5,7 @@
string clientVersion = _0_Framework.Application.Version.StyleVersion;
<link href="~/AssetsClient/css/table-style.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/card.css?ver=@clientVersion" rel="stylesheet" />
<style>
.btn-download-android {
@@ -114,7 +115,10 @@
</div>
</div>
}
<div Permission="@SubAccountPermissionHelper.AddEmployeePermissionCode" class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-3 col-xxl-2 mt-3">
<div class="card p-0">
<div class="card-section-btn">
@@ -258,6 +262,61 @@
</div>
</div>
</div>
@* <div class="d-grid gap-3 my-3 card-area-dashboard">
<div class="card p-0">
<div class="card-section d-flex align-items-center justify-content-between">
<button type="button" class="btn-main loadingButton d-flex align-items-center justify-content-start" onclick="location.href='@Url.Page("./Company/Employees/EmployeeList")';">
<svg width="50" height="50" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin: 0 0 0 10px;">
<path d="M12 10C14.2091 10 16 8.20914 16 6C16 3.79086 14.2091 2 12 2C9.79086 2 8 3.79086 8 6C8 8.20914 9.79086 10 12 10Z" fill="#23A8A8" />
<path opacity="0.5" d="M18.0947 15.0312C17.6699 15 17.1487 15 16.5 15C14.8501 15 14.0251 15 13.5126 15.5126C13 16.0251 13 16.8501 13 18.5C13 19.6663 13 20.4204 13.1811 20.9433C12.7971 20.9806 12.4025 21 12 21C8.13401 21 5 19.2091 5 17C5 14.7909 8.13401 13 12 13C14.6134 13 16.8924 13.8184 18.0947 15.0312Z" fill="#C4E8E8" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 22C14.8501 22 14.0251 22 13.5126 21.4874C13 20.9749 13 20.1499 13 18.5C13 16.8501 13 16.0251 13.5126 15.5126C14.0251 15 14.8501 15 16.5 15C18.1499 15 18.9749 15 19.4874 15.5126C20 16.0251 20 16.8501 20 18.5C20 20.1499 20 20.9749 19.4874 21.4874C18.9749 22 18.1499 22 16.5 22ZM17.0833 16.9444C17.0833 16.6223 16.8222 16.3611 16.5 16.3611C16.1778 16.3611 15.9167 16.6223 15.9167 16.9444V17.9167H14.9444C14.6223 17.9167 14.3611 18.1778 14.3611 18.5C14.3611 18.8222 14.6223 19.0833 14.9444 19.0833H15.9167V20.0556C15.9167 20.3777 16.1778 20.6389 16.5 20.6389C16.8222 20.6389 17.0833 20.3777 17.0833 20.0556V19.0833H18.0556C18.3777 19.0833 18.6389 18.8222 18.6389 18.5C18.6389 18.1778 18.3777 17.9167 18.0556 17.9167H17.0833V16.9444Z" fill="#23A8A8" />
</svg>
<span class="btn-title text-nowrap m-0">عملیات پرسنل</span>
</button>
<div class="row gap-1 justify-content-end px-3">
<button Permission="@SubAccountPermissionHelper.AddEmployeePermissionCode" type="button" class="btn-optional loadingButton d-flex align-items-center justify-content-center" onclick="location.href='#showmodal=@Url.Page("./Index", "CreateEmployee")';">
<span class="btn-title text-nowrap m-0">پرسنل جدید</span>
</button>
<button Permission="@SubAccountPermissionHelper.LeftWorkEmployeePermissionCode" type="button" class="btn-optional loadingButton d-flex align-items-center justify-content-center" onclick="location.href='#showmodal=@Url.Page("./Company/Employees/EmployeeList", "CreateLeftWorkEmployee")';">
<spanة class="btn-title text-nowrap m-0">اعلام ترک کار</spanة
</button>
</div>
<div class="spinner-loading loading" style="display: none;">
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
</div>
</div>
</div>
</div> *@
@*< div Permission="@SubAccountPermissionHelper.CreateFinePermissionCode" class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-3 col-xxl-2 mt-3 @(Model.HasCustomizeCheckoutService != "true" ? "d-none" : "")">
<div class="card p-0">
<div class="card-section-btn">
<div class="content btn-group">
<button class="btn loadingButton" style="border-radius: 10px !important;" onclick="location.href='#showmodal=@Url.Page("./Company/Fine/Index", "Create")';">
<svg width="50" height="50" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin: 0 0 0 10px;">
<path d="M1.70026 20.24C1.71026 20.23 1.71027 20.22 1.71027 20.22L7.21027 14.72C7.22027 14.71 7.23023 14.71 7.24023 14.7C6.60023 14.26 5.82023 14 4.99023 14C2.78023 14 0.990234 15.79 0.990234 18C0.990234 18.75 1.20025 19.46 1.57025 20.06C1.62025 20.12 1.66026 20.18 1.70026 20.24Z" fill="#23A8A8"/>
<path d="M8.29999 15.75C8.28999 15.76 8.29003 15.77 8.28003 15.78L2.78003 21.28C2.77003 21.29 2.76 21.29 2.75 21.3C3.39 21.74 4.16 22 5 22C6.46 22 7.72998 21.22 8.41998 20.06C8.78998 19.46 9 18.75 9 18C9 17.16 8.73999 16.39 8.29999 15.75Z" fill="#23A8A8"/>
<path d="M22 9V15C22 18.5 20 20 17 20H8.45001C8.80001 19.41 9 18.73 9 18C9 15.79 7.21 14 5 14C3.8 14 2.73 14.53 2 15.36V9C2 5.5 4 4 7 4H17C20 4 22 5.5 22 9Z" fill="#C4E8E8"/>
<path d="M12 14.5C13.3807 14.5 14.5 13.3807 14.5 12C14.5 10.6193 13.3807 9.5 12 9.5C10.6193 9.5 9.5 10.6193 9.5 12C9.5 13.3807 10.6193 14.5 12 14.5Z" fill="#23A8A8"/>
<path d="M18.5 14.75C18.09 14.75 17.75 14.41 17.75 14V10C17.75 9.59 18.09 9.25 18.5 9.25C18.91 9.25 19.25 9.59 19.25 10V14C19.25 14.41 18.91 14.75 18.5 14.75Z" fill="#23A8A8"/>
</svg>
<p class="btn-title text-nowrap m-0">ثبت جرائم</p>
<div class="spinner-loading loading rounded-0" style="display: none;">
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
</div>
</button>
</div>
</div>
</div>
</div> *@
@* <div class="col-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl-4 mt-3">
@@ -297,7 +356,8 @@
$(document).ready(function () {
$('.loadingButton').on('click', function () {
var button = $(this);
var loadingDiv = button.find('.loading');
// var loadingDiv = button.find('.loading');
var loadingDiv = button.next('.loading');
loadingDiv.show();
});
});

View File

@@ -15,6 +15,7 @@ using PersianTools.Core;
using System.Security.Claims;
using _0_Framework.Domain.CustomizeCheckoutShared.Enums;
using _0_Framework.Infrastructure;
using AccountManagement.Application.Contracts.CameraAccount;
using CompanyManagment.App.Contracts.Bank;
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
using CompanyManagment.App.Contracts.Job;
@@ -45,6 +46,7 @@ namespace ServiceHost.Areas.Client.Pages
private readonly IJobApplication _jobApplication;
private readonly ICustomizeWorkshopSettingsApplication _customizeWorkshopEmployee;
private readonly IRollCallEmployeeStatusApplication _rollCallEmployeeStatusApplication;
private readonly ICameraAccountApplication _cameraAccountApplication;
public string profilePicture { get; set; }
public string AccountFullName { get; set; }
@@ -65,7 +67,7 @@ namespace ServiceHost.Areas.Client.Pages
public bool HasApkToDownload { get; set; }
#endregion
public IndexModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ILeaveApplication leaveApplication, IEmployeeApplication employeeApplication, IPaymentToEmployeeItemApplication paymentToEmployeeItemApplication, IPaymentToEmployeeApplication paymentToEmployeeApplication, IHolidayItemApplication holidayItemApplication, IInsuranceListApplication insuranceListApplication, IAndroidApkVersionApplication androidApkVersionApplication, IRollCallServiceApplication rollCallServiceApplication, IPersonnelCodeApplication personnelCodeApplication, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication, IBankApplication bankApplication, ILeftWorkTempApplication leftWorkTempApplication, IJobApplication jobApplication, ICustomizeWorkshopSettingsApplication customizeWorkshopEmployee, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication)
public IndexModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ILeaveApplication leaveApplication, IEmployeeApplication employeeApplication, IPaymentToEmployeeItemApplication paymentToEmployeeItemApplication, IPaymentToEmployeeApplication paymentToEmployeeApplication, IHolidayItemApplication holidayItemApplication, IInsuranceListApplication insuranceListApplication, IAndroidApkVersionApplication androidApkVersionApplication, IRollCallServiceApplication rollCallServiceApplication, IPersonnelCodeApplication personnelCodeApplication, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication, IBankApplication bankApplication, ILeftWorkTempApplication leftWorkTempApplication, IJobApplication jobApplication, ICustomizeWorkshopSettingsApplication customizeWorkshopEmployee, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication, ICameraAccountApplication cameraAccountApplication)
{
_workshopApplication = workshopApplication;
_employeeApplication = employeeApplication;
@@ -82,6 +84,7 @@ namespace ServiceHost.Areas.Client.Pages
_jobApplication = jobApplication;
_customizeWorkshopEmployee = customizeWorkshopEmployee;
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
_cameraAccountApplication = cameraAccountApplication;
_leaveApplication = leaveApplication;
_authHelper = authHelper;
_passwordHasher = passwordHasher;
@@ -635,5 +638,48 @@ namespace ServiceHost.Areas.Client.Pages
}
#endregion
#region CameraAccountAndWorkshopSetting
public IActionResult OnGetStatusCameraAccountAndWorkshopSetting()
{
var account = _authHelper.CurrentAccountInfo();
var workshopSlug = User.FindFirstValue("WorkshopSlug");
var workshopId = _passwordHasher.SlugDecrypt(workshopSlug);
if (workshopId < 0)
return BadRequest();
var workshopSettings = _customizeWorkshopSettingsApplication.GetWorkshopSettingsByWorkshopId(workshopId, account);
var hasRollCallWorkshopSetting = !workshopSettings.ArePropertiesEqual(new CustomizeWorkshopSettingsViewModel());
var allServices = _rollCallServiceApplication.GetAllServiceByWorkshopId(workshopId);
var hasPreviousService = allServices.Any();
var activeService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
var hasRollCallService = activeService != null;
bool hasCameraAccount;
if (hasRollCallService)
{
var accountId = _authHelper.CurrentAccountId();
var cameraAccountExists = _cameraAccountApplication.HasCameraAccount(workshopId, accountId);
hasCameraAccount = cameraAccountExists && hasPreviousService;
}
else
{
hasCameraAccount = !hasPreviousService;
}
return new JsonResult(new
{
hasRollCallWorkshopSetting,
hasCameraAccount,
hasRollCallService
});
}
#endregion
}
}

View File

@@ -35,6 +35,7 @@
<link href="~/AssetsClient/libs/intro.js/introjs.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/introjs-custom.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/style.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/sidebar-menu.css?ver=شسشس" rel="stylesheet" />
<link href="~/AssetsClient/css/responsive.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/responsive-modal.css?ver=@clientVersion" rel="stylesheet" />
<link href="~/AssetsClient/css/validation-style.css?ver=@clientVersion" rel="stylesheet" />
@@ -89,280 +90,364 @@
<script src="~/assetsclient/js/datevalidation.js"></script>
<script src="~/assetsclient/js/html2canvas.min.js"></script>
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
<script src="~/assetsclient/js/smooth-scrollbar.js"></script>
@* <script src="~/assetsclient/js/smooth-scrollbar.js"></script> *@
<script>
var MainMenuScrollbar = window.Scrollbar;
MainMenuScrollbar.init(document.querySelector('.menuContainer'), {
alwaysShowTracks: true
});
<script>
var antiForgeryTokenLayout = $('@Html.AntiForgeryToken()').val();
var createTicketSaveAjaxLayout = '@Url.Page("/Company/Ticket/Index", "SaveTicket")';
var uploadFileTicketAjaxLayout = '@Url.Page("/Company/Ticket/Index", "UploadFile")';
var deleteFileTicketAjaxLayout = '@Url.Page("/Company/Ticket/Index", "DeleteFile")';
var deleteAllFilesTicketAjaxLayout = '@Url.Page("/Company/Ticket/Index", "RemoveAllTempFiles")';
var antiForgeryTokenLayout = $('@Html.AntiForgeryToken()').val();
var createTicketSaveAjaxLayout = '@Url.Page("/Company/Ticket/Index", "SaveTicket")';
var uploadFileTicketAjaxLayout = '@Url.Page("/Company/Ticket/Index", "UploadFile")';
var deleteFileTicketAjaxLayout = '@Url.Page("/Company/Ticket/Index", "DeleteFile")';
var deleteAllFilesTicketAjaxLayout = '@Url.Page("/Company/Ticket/Index", "RemoveAllTempFiles")';
$('#MainModal').on('hidden.bs.modal', function () {
$("#ModalContent").html("");
$("#printSection").html("");
});
// check and show modal Camera Account And Workshop Setting
var statusCameraAccountAndWorkshopSettingUrl = `@Url.Page("/Index", "StatusCameraAccountAndWorkshopSetting")`;
var linkCameraAccountAndWorkshopSettingUrl = `#showmodal=@Url.Page("/Company/RollCall/Index", "SaveCameraAccountAndWorkshopSetting")`;
var url = window.location.href.split('?')[0];
var url2 = window.location.href.split('#')[0];
var ajaxServiceLayout = new AjaxService(antiForgeryTokenLayout);
$('.selectLi').filter(function () {
if (this.href == url || this.href == url2) {
$(this).parent().addClass('active');
};
});
$(document).ready(function () {
ajaxServiceLayout.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
const disableIds = [
'#UploadEmployeePicturePageUrl',
'#ListCurrentDayRollCallsPageUrl',
'#ListRollCallHistoryPageUrl',
'#GroupingOperationsPageUrl'
];
function tutorialIntro() {
localStorage.removeItem("hasCompletedDashboardTour");
localStorage.removeItem("hasCompletedWorkShopTour");
localStorage.removeItem("cardContractIntro");
localStorage.removeItem("hasCompletedEmployeesTour");
localStorage.removeItem("hasCompletedEmployeesLeaveTour");
localStorage.removeItem("hasCompletedEmployeesLeaveListTour");
}
if (response.hasRollCallService) {
$('#RollCallSubMenu').removeClass('disable');
$(document).ready(function () {
if ($(window).width() < 992) {
$(".sidebar-navigation").toggleClass("small");
// $(".main-wrapper").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
const shouldDisable = !response.hasCameraAccount || !response.hasRollCallWorkshopSetting;
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
disableIds.forEach(id => {
$(id).toggleClass('disable', shouldDisable);
});
if (shouldDisable) {
$('#SetWorkshopWorkingHoursPageUrl a').attr('href', linkCameraAccountAndWorkshopSettingUrl);
} else {
$('#SetWorkshopWorkingHoursPageUrl').removeClass('disable');
}
} else {
$('#RollCallSubMenu').addClass('disable');
}
});
});
$('#MainModal').on('hidden.bs.modal', function () {
$("#ModalContent").html("");
$("#printSection").html("");
});
var url = window.location.href.split('?')[0];
var url2 = window.location.href.split('#')[0];
$('.sidebar-menu li').removeClass('active');
// $('.selectLi').filter(function () {
// if (this.href == url || this.href == url2) {
// $(this).parent().addClass('active');
// };
// });
$(".content-container").toggleClass("small");
// $(".content-container").toggleClass("");
$('.selectLi').filter(function () {
let href = this.href.split('?')[0].split('#')[0];
return href === url || href === url2;
}).each(function () {
$(this).parent().addClass('active');
}
if ($(window).width() > 992) {
$('#overlay').toggleClass("overlay");
}
});
$(".toggle").click(function () {
$(".sidebar-navigation").toggleClass("small");
// $(".main-wrapper").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
const $submenu = $(this).closest('.submenu');
if ($submenu.length) {
$submenu.addClass('open').show();
$submenu.closest('.has-submenu').addClass('active');
$submenu.closest('.has-submenu').find('.toggle-submenu').addClass('open');
}
});
$(".content-container").toggleClass("small");
// $(".content-container").toggleClass("");
$('.toggle-submenu').on('click', function (e) {
e.preventDefault();
$('#overlay').toggleClass("overlay");
});
const $this = $(this);
const $submenu = $this.closest('.has-submenu').find('.submenu');
$("#close-sidemenu-mobile").click(function () {
$(".sidebar-navigation").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
$('.submenu').not($submenu).slideUp().removeClass('open');
$('.toggle-submenu').not($this).removeClass('open');
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
$submenu.slideToggle().toggleClass('open');
$this.toggleClass('open');
});
$('.selectLi').on('click', function () {
$('.sidebar-menu li').removeClass('active');
const $clickedLi = $(this).closest('li');
$clickedLi.addClass('active');
$(".content-container").toggleClass("small");
$('#overlay').toggleClass("overlay");
});
$("#overlay").click(function () {
$(".sidebar-navigation").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
$(".content-container").toggleClass("small");
$('#overlay').toggleClass("overlay");
});
//******************** بستن مودال خطا ********************
$(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");
}
});
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');
};
});
}
// $(document).ready(function () {
// var Scrollbar1 = window.Scrollbar;
// Scrollbar1.init(document.querySelector('#ModelDivScrollbar'), {
// alwaysShowTracks: true,
// });
// });
function SelectWorkshop(slug) {
$.ajax({
async: false,
dataType: 'json',
url: '@Url.Page("/Index", "SelectWorkshop")',
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
type: 'POST',
data: { slug: slug },
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();
}, 500);
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
$(document).ready(function () {
_RefreshCountMenu();
$('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];
var str = input;
for (var i = 0; i < 10; i++) {
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
}
return str;
}
function _RefreshCountMenu() {
$.ajax({
async: true,
dataType: 'json',
url: '/Client/Company/WorkFlow?handler=CountWorkFlowLayout',
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
type: 'GET',
success: function (response) {
if (response.success) {
if (response.countWorkFlow === 0) {
$('#_countWorkFlowMenu').hide();
$('#spinnerWorkFlow').hide();
$('#_countWorkFlowMenuMobile').hide();
$('#spinnerWorkFlowMobile').hide();
} else {
$('#_countWorkFlowMenu').show();
$('#spinnerWorkFlow').hide();
$('#_countWorkFlowMenuMobile').show();
// $('#spinnerWorkFlowMobile').hide();
$('#_countWorkFlowMenu').text(response.countWorkFlow);
$('#_countWorkFlowMenuMobile').text(response.countWorkFlow);
}
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
if ($clickedLi.closest('.submenu').length) {
$clickedLi.closest('.has-submenu').addClass('active');
}
});
// Override the global fetch function to handle errors
// const originalErrorHandler = $.ajaxSetup().error;
$.ajaxSetup({
error: function (jqXHR, textStatus, errorThrown) {
if (jqXHR.status === 500) {
try {
const errorData = jqXHR.responseJSON;
$('.alert-msg').show();
$('.alert-msg p').text(errorData.message || "خطای سمت سرور");
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
} catch (e) {
$('.alert-msg').show();
$('.alert-msg p').text("خطای سمت سرور");
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
console.error("Error parsing response:", e);
}
}
}
});
</script>
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");
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
$(".content-container").toggleClass("small");
// $(".content-container").toggleClass("");
}
if ($(window).width() > 992) {
$('#overlay').toggleClass("overlay");
}
});
$(".toggle").click(function () {
$(".sidebar-navigation").toggleClass("small");
// $(".main-wrapper").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
$(".content-container").toggleClass("small");
// $(".content-container").toggleClass("");
$('#overlay').toggleClass("overlay");
});
$("#close-sidemenu-mobile").click(function () {
$(".sidebar-navigation").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
$(".content-container").toggleClass("small");
$('#overlay').toggleClass("overlay");
});
$("#overlay").click(function () {
$(".sidebar-navigation").toggleClass("small");
$(".sidebar").toggleClass("active-sidebar-navigation");
$(".header-container").toggleClass("main-wrapper ");
$(".header-container").toggleClass("small");
$(".content-container").toggleClass("small");
$('#overlay').toggleClass("overlay");
});
//******************** بستن مودال خطا ********************
$(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");
}
});
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');
};
});
}
// $(document).ready(function () {
// var Scrollbar1 = window.Scrollbar;
// Scrollbar1.init(document.querySelector('#ModelDivScrollbar'), {
// alwaysShowTracks: true,
// });
// });
function SelectWorkshop(slug) {
$.ajax({
async: false,
dataType: 'json',
url: '@Url.Page("/Index", "SelectWorkshop")',
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
type: 'POST',
data: { slug: slug },
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();
}, 500);
} else {
$('.alert-msg').show();
$('.alert-msg p').text(response.message);
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
$(document).ready(function () {
_RefreshCountMenu();
$('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];
var str = input;
for (var i = 0; i < 10; i++) {
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
}
return str;
}
function _RefreshCountMenu() {
$.ajax({
async: true,
dataType: 'json',
url: '/Client/Company/WorkFlow?handler=CountWorkFlowLayout',
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
type: 'GET',
success: function (response) {
if (response.success) {
if (response.countWorkFlow === 0) {
$('#_countWorkFlowMenu').hide();
$('#spinnerWorkFlow').hide();
$('#_countWorkFlowMenuMobile').hide();
$('#spinnerWorkFlowMobile').hide();
} else {
$('#_countWorkFlowMenu').css('display', 'flex');
$('#spinnerWorkFlow').hide();
$('#_countWorkFlowMenuMobile').show();
// $('#spinnerWorkFlowMobile').hide();
$('#_countWorkFlowMenu').text(response.countWorkFlow);
$('#_countWorkFlowMenuMobile').text(response.countWorkFlow);
}
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
}
});
}
// Override the global fetch function to handle errors
// const originalErrorHandler = $.ajaxSetup().error;
$.ajaxSetup({
error: function (jqXHR, textStatus, errorThrown) {
if (jqXHR.status === 500) {
try {
const errorData = jqXHR.responseJSON;
$('.alert-msg').show();
$('.alert-msg p').text(errorData.message || "خطای سمت سرور");
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
} catch (e) {
$('.alert-msg').show();
$('.alert-msg p').text("خطای سمت سرور");
setTimeout(function () {
$('.alert-msg').hide();
$('.alert-msg p').text('');
}, 3500);
console.error("Error parsing response:", e);
}
}
}
});
</script>
<script src="~/assetsclient/js/tickets_action.js?ver=@clientVersion"></script>
@RenderSection("Script", false)
<script>
// window.addEventListener('load', function () {
// console.clear();
// console.log('%c سامانه هوشمند گزارشگیر ©', 'font-family: \'IRANYekanX\', serif; color: #00ff00; font-size: 10px; font-weight: bold;');
// });
</script>
// window.addEventListener('load', function () {
// console.clear();
// console.log('%c سامانه هوشمند گزارشگیر ©', 'font-family: \'IRANYekanX\', serif; color: #00ff00; font-size: 10px; font-weight: bold;');
// });
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@@ -117,25 +117,6 @@
/* X-Large devices (desktops, 1366px and up) */
@media (max-width: 1366px) {
.sidebar-navigation .logo {
width: 95px;
}
.sidebar-navigation {
width: 280px;
padding: 1rem !important;
}
.sidebar-navigation > .sidebar-menu > ul li {
padding: 3px;
margin: 3px 2px;
}
.sidebar-navigation > .sidebar-menu > ul li a {
font-size: 12px;
font-weight: 400;
}
.title {
font-size: 16px;
font-weight: 600;
@@ -324,162 +305,8 @@
}
/* Large devices (desktops, 1200px and up) */
@media (min-width: 992px) {
.sidebar-navigation > .sidebar-menu {
display: block;
}
.sidebar-navigation > .sidebar-menu-mobile {
display: none;
}
.sidebar-navigation > .sidebar-menu-mobile > ul {
font-size: 13px;
font-weight: 200;
}
.sidebar-navigation > .sidebar-menu-mobile > ul li {
border-radius: 15px;
border: 0.5px solid transparent;
}
.sidebar-navigation > .sidebar-menu-mobile > ul li a svg {
width: 50px;
height: 50px;
}
.sidebar-navigation > .sidebar-menu-mobile > ul li:hover {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation.small {
padding: 2rem 0.6rem !important;
width: 80px;
margin-right: 0;
transition: ease .4s;
transition-timing-function: cubic-bezier(0.9,0,1,1);
}
.sidebar-navigation.small .logo {
padding: 0;
width: 50px;
height: 50px;
text-align: center;
}
.sidebar-navigation.small > .sidebar-menu > ul li a span {
display: none;
transition: ease .4s;
/* transition-timing-function: cubic-bezier(0.9,0,1,1); */
}
.sidebar-navigation.small > .sidebar-menu > ul li a .alert-number {
display: flex;
position: absolute;
top: -15px;
right: -9px;
width: 20px;
height: 20px;
font-size: 12px;
}
.sidebar-navigation.small > .sidebar-menu > ul li {
border-radius: 50px;
padding: 8px 0;
margin: 6px auto;
display: flex;
align-items: center;
justify-content: center;
}
.small .toggle {
margin-right: 85px;
transition: ease .4s;
}
.content-container.small {
margin-right: 85px;
transition: ease .4s;
}
}
/* Large devices (desktops, 992px and up) */
@media (max-width: 992px) {
.sidebar-navigation {
width: 280px;
/* height: 100% !important; */
}
.sidebar-navigation > .sidebar-menu {
display: none;
}
.sidebar-navigation > .sidebar-menu-mobile ul {
font-size: 13px;
font-weight: 200;
}
.sidebar-navigation > .sidebar-menu-mobile ul li {
border-radius: 15px;
margin: 1px 0;
border: 0.5px solid transparent;
transition: all .3s ease;
}
.sidebar-navigation > .sidebar-menu-mobile ul li a svg {
width: 35px;
height: 35px;
stroke-width: 1.5px;
}
.sidebar-navigation > .sidebar-menu-mobile ul li:hover {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation .sidebar-menu-mobile ul li.active {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.header-left {
display: none !important;
}
/* Sidebar Navigation Small */
.sidebar-navigation.small {
padding: 0 !important;
width: 0;
right: 0;
}
.sidebar-navigation.small > .sidebar-menu-mobile {
display: none !important;
}
.sidebar-navigation.small > .sidebar-menu-mobile > ul li a span {
display: none;
}
.sidebar-navigation.small > .sidebar-menu-mobile > ul li {
display: none;
}
.small .toggle {
margin-right: 10px;
transition: ease .4s;
}
.content-container {
margin: 0 0 80px 0;
transition: ease .4s;
}
.btn-primary, .btn-secondary {
width: 140px;
font-size: 13px;
@@ -490,10 +317,6 @@
margin-left: 0.4rem;
}
.modal-dialog {
/* max-width: 770px; */
}
.menu-bottom {
border-top: 2px solid #097575;
padding: 5px;
@@ -1496,11 +1319,6 @@
font-weight: 400;
}
.sidebar-navigation .sidebar-menu-mobile > ul li a svg {
width: 40px;
height: 40px;
}
/* .modal-content label{
font-size: 12px;
} */
@@ -1713,11 +1531,6 @@
No media query for `xs` since this is the default in Bootstrap
*/
@media (max-width: 416px) {
.sidebar-navigation .sidebar-menu-mobile > ul li a svg {
width: 40px;
height: 40px;
}
.inputGroup-sizing-gender label, .inputGroup-sizing-region label, .inputGroup-sizing-marriage label {
margin-left: 7px;
font-size: 9px;

View File

@@ -0,0 +1,600 @@
/* Sidebar Navigation */
.sidebar-menu {
display: flex;
flex-direction: column;
height: 100vh;
}
.sidebar-navigation {
background: linear-gradient(180deg, #30C2C2 0%, #077171 100%);
border-radius: 35px 0px 0px 35px;
padding: 0;
width: 280px;
height: 100%;
position: fixed;
margin-right: -300px;
background-color: #100901;
/*overflow: auto;*/
z-index: 1011 !important;
overflow: hidden;
transition: ease .3s;
}
/* submenu */
.toggle-submenu {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
position: relative;
}
.has-submenu {
position: relative;
}
.arrow-icon {
display: flex;
align-items: center;
transition: transform 0.3s ease;
}
.arrow-icon svg {
transition: transform 0.3s ease;
transform: rotate(0deg);
}
.toggle-submenu.open .arrow-icon svg {
transform: rotate(-90deg);
}
.submenu {
position: relative;
display: none;
padding-right: 2rem;
}
.submenu:before {
content: "";
position: absolute;
width: 3px;
height: 95%;
background: #69C3C3;
right: 18px;
top: 5px;
border-radius: 10px;
}
.submenu li {
position: relative;
}
.submenu li:before {
content: "";
position: absolute;
width: 9px;
height: 9px;
background: #69C3C3;
right: -20px;
top: 50%;
border-radius: 50px;
transform: translate(0px, -50%);
}
.sidebar-navigation > .sidebar-menu > ul li > .submenu li {
padding: 6px 10px !important;
}
.submenu li.active:before {
background: #ffffff;
}
.submenu.open {
display: block;
}
/* submenu */
.menuContainer {
height: 75vh;
overflow-y: auto;
overflow-x: hidden;
padding: 0 0.6rem;
flex-grow: 1;
scrollbar-gutter: stable;
direction: ltr;
/*writing-mode: horizontal-tb;*/
/* scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, 0.3) transparent;*/
user-select: none;
}
.menuContainer::-webkit-scrollbar {
width: 6px;
direction: ltr !important;
}
.menuContainer::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
border-radius: 10px;
}
.menuContainer::-webkit-scrollbar-track {
background: transparent;
}
.menuContainer .scrollbar-track {
background: transparent !important;
border-radius: 10px;
}
.menuContainer .scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3) !important;
border-radius: 10px !important;
}
.menuContainer .scrollbar-track-x {
display: none !important;
}
.menuContainer .scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.5) !important;
}
.active-sidebar-navigation {
margin-right: 0;
}
.sidebar-navigation .logo {
padding: 10px;
width: 110px;
text-align: center;
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li {
border-radius: 22px;
padding: 6px;
margin: 5px 2px;
/* padding: 8px 0;
margin: 6px auto; */
border: 0.5px solid transparent;
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li:hover {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation > .sidebar-menu > ul li.active {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation > .sidebar-menu > ul li a {
position: relative;
color: #ffffff;
text-align: right;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
display: flex;
align-items: center;
cursor: pointer;
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li a span {
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li a span.alert-number {
background-color: #dd2a2a;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 40px;
color: #fff;
font-weight: 600;
padding: 2px 0 0 0;
}
.sidebar-navigation > .sidebar-menu > ul li a svg {
margin: auto 2px;
}
/* Sidebar Navigation Small */
/*.sidebar-navigation.small {
padding: 2rem 0.6rem !important;
width: 80px;
transition: ease .4s;*/
/* transition-timing-function: cubic-bezier(0.9,0,1,1); */
/*}*/
.sidebar-navigation.small {
margin-right: -280px;
transition: ease .4s;
/* transition-timing-function: cubic-bezier(0.9,0,1,1); */
}
.sidebar-navigation.small .menuContainer {
overflow-y: visible;
}
.sidebar-navigation.small .logo {
padding: 0;
width: 50px;
height: 50px;
text-align: center;
}
.sidebar-navigation.small > .sidebar-menu > ul li a span {
display: none;
transition: ease .4s;
/* transition-timing-function: cubic-bezier(0.9,0,1,1); */
}
.sidebar-navigation.small > .sidebar-menu > ul li {
border-radius: 50px;
padding: 8px 0;
margin: 6px auto;
display: flex;
align-items: center;
justify-content: center;
}
.sidebar-navigation.small > .sidebar-menu > ul li .submenu {
position: absolute;
width: auto;
z-index: 60;
background-color: #000;
background: linear-gradient(180deg, #30C2C2 0%, #077171 100%);
top: 0;
right: 42px;
border-radius: 10px 0 0 10px;
display: none;
}
.sidebar-navigation.small > .sidebar-menu > ul li:hover .submenu a span {
display: block;
white-space: nowrap;
text-align: right;
}
.sidebar-navigation.small > .sidebar-menu > ul li:hover .submenu {
display: block !important;
}
.static-menu {
z-index: 1010;
}
@media (max-width: 1366px) {
.sidebar-navigation .logo {
width: 95px;
}
.sidebar-navigation {
width: 280px;
/*padding: 1rem !important;*/
}
.sidebar-navigation > .sidebar-menu > ul li {
padding: 3px;
margin: 3px 2px;
}
.sidebar-navigation > .sidebar-menu > ul li a {
font-size: 12px;
font-weight: 400;
}
}
@media (max-width: 1366px) {
.sidebar-navigation .logo {
width: 95px;
}
.sidebar-navigation {
width: 280px;
/*padding: 1rem !important;*/
}
.sidebar-navigation > .sidebar-menu > ul li {
padding: 5px 8px;
margin: 3px 2px;
}
.sidebar-navigation > .sidebar-menu > ul li a {
font-size: 12px;
font-weight: 400;
}
}
/* Large devices (desktops, 1200px and up) */
@media (min-width: 992px) {
.sidebar-navigation > .sidebar-menu {
display: block;
}
.sidebar-navigation > .sidebar-menu-mobile {
display: none;
}
.sidebar-navigation > .sidebar-menu-mobile > ul {
font-size: 13px;
font-weight: 200;
}
.sidebar-navigation > .sidebar-menu-mobile > ul li {
border-radius: 15px;
border: 0.5px solid transparent;
}
.sidebar-navigation > .sidebar-menu-mobile > ul li a svg {
width: 50px;
height: 50px;
}
.sidebar-navigation > .sidebar-menu-mobile > ul li:hover {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
/* .sidebar-navigation.small {
padding: 2rem 0.6rem !important;
width: 80px;
margin-right: 0;
transition: ease .4s;
transition-timing-function: cubic-bezier(0.9,0,1,1);
}*/
.sidebar-navigation.small {
margin-right: -280px;
transition: ease .4s;
}
.sidebar-navigation.small .logo {
padding: 0;
width: 50px;
height: 50px;
text-align: center;
}
.sidebar-navigation.small > .sidebar-menu > ul li a .alert-number {
display: flex;
position: absolute;
top: -15px;
right: -9px;
width: 20px;
height: 20px;
font-size: 12px;
}
.sidebar-navigation.small > .sidebar-menu > ul li {
border-radius: 50px;
padding: 8px 0;
margin: 6px auto;
display: flex;
align-items: center;
justify-content: center;
}
.small .toggle {
/*margin-right: 85px;*/
margin-right: 10px;
transition: ease .4s;
}
.content-container.small {
margin-right: 0;
transition: ease .4s;
}
}
/* Large devices (desktops, 992px and up) */
@media (max-width: 992px) {
.sidebar-navigation {
width: 280px;
/* height: 100% !important; */
}
.sidebar-navigation > .sidebar-menu-mobile ul {
font-size: 13px;
font-weight: 200;
}
.sidebar-navigation > .sidebar-menu-mobile ul li {
border-radius: 15px;
margin: 1px 0;
border: 0.5px solid transparent;
transition: all .3s ease;
}
.sidebar-navigation > .sidebar-menu-mobile ul li a svg {
width: 35px;
height: 35px;
stroke-width: 1.5px;
}
.sidebar-navigation > .sidebar-menu-mobile ul li:hover {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation .sidebar-menu-mobile ul li.active {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.header-left {
display: none !important;
}
/* Sidebar Navigation Small */
.sidebar-navigation.small {
padding: 0 !important;
width: 0;
right: 0;
}
.sidebar-navigation.small > .sidebar-menu-mobile {
display: none !important;
}
.sidebar-navigation.small > .sidebar-menu-mobile > ul li a span {
display: none;
}
.sidebar-navigation.small > .sidebar-menu-mobile > ul li {
display: none;
}
.small .toggle {
margin-right: 10px;
transition: ease .4s;
}
.content-container {
margin: 0 0 80px 0;
transition: ease .4s;
}
}
@media (max-width: 576px) {
.sidebar-navigation .sidebar-menu-mobile > ul li a svg {
width: 40px;
height: 40px;
}
}
@media (max-width: 416px) {
.sidebar-navigation .sidebar-menu-mobile > ul li a svg {
width: 40px;
height: 40px;
}
}
/*-----------------------*/
/* Profile in Mobile Section */
.sidebar-navigation .profile-sidebar-menu-mobile {
width: 100%;
background: rgba(255, 255, 255, 0.17);
border-radius: 15px 15px 15px 30px;
text-align: right;
bottom: 15px;
padding: 5px;
flex-direction: column;
justify-content: space-between;
}
.sidebar-navigation .profile-sidebar-menu-mobile svg {
width: 30px;
}
.sidebar-navigation .profile-sidebar-menu-mobile a {
width: 100%;
font-size: 13px;
border: 0.5px solid transparent;
padding: 3px;
margin: 1px 5px;
transition: all .3s ease;
}
.sidebar-navigation .profile-sidebar-menu-mobile a:hover {
border-radius: 15px;
border: 0.5px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation .profile-sidebar-menu-mobile .li-profile.active {
border-radius: 15px;
border: 0.5px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation .profile-sidebar-menu-mobile img {
border-radius: 50%;
width: 40px;
}
.sidebar-navigation .profile-sidebar-menu-mobile a svg {
width: 30px;
height: 30px;
color: #30C2C2;
}
/* End Profile in Mobile Section */

View File

@@ -405,86 +405,6 @@ ul {
z-index: 60;
}
/* Sidebar Navigation */
.sidebar-navigation {
background: linear-gradient(180deg, #30C2C2 0%, #077171 100%);
border-radius: 35px 0px 0px 35px;
padding: 2rem !important;
width: 280px;
height: 100%;
position: fixed;
margin-right: -300px;
background-color: #100901;
/*overflow: hidden;*/
z-index: 1011 !important;
transition: ease .4s;
}
.active-sidebar-navigation {
margin-right: 0;
}
.sidebar-navigation .logo {
padding: 10px;
width: 125px;
text-align: center;
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li {
border-radius: 50px;
padding: 6px;
margin: 4px 2px;
/* padding: 8px 0;
margin: 6px auto; */
border: 0.5px solid transparent;
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li:hover {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation > .sidebar-menu > ul li.active {
border: 0.5px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation > .sidebar-menu > ul li a {
position: relative;
color: #ffffff;
text-align: right;
font-size: 14px;
font-style: normal;
font-weight: 400;
line-height: normal;
display: flex;
align-items: center;
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li a span {
transition: ease .4s;
}
.sidebar-navigation > .sidebar-menu > ul li a span.alert-number {
background-color: #dd2a2a;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 40px;
color: #fff;
font-weight: 600;
padding: 2px 0 0 0;
}
.sidebar-navigation > .sidebar-menu > ul li a svg {
margin: auto 2px;
}
/******************************** Start for top menu and main wrpaer ********************************/
@@ -505,92 +425,6 @@ ul {
/******************************** End for top menu and main wrpaer ********************************/
/* Profile in Mobile Section */
.sidebar-navigation .profile-sidebar-menu-mobile {
width: 100%;
background: rgba(255, 255, 255, 0.17);
border-radius: 15px;
text-align: right;
bottom: 15px;
padding: 5px;
flex-direction: column;
justify-content: space-between;
}
.sidebar-navigation .profile-sidebar-menu-mobile svg {
width: 30px;
}
.sidebar-navigation .profile-sidebar-menu-mobile a {
width: 100%;
font-size: 13px;
border: 0.5px solid transparent;
padding: 3px;
margin: 1px 5px;
transition: all .3s ease;
}
.sidebar-navigation .profile-sidebar-menu-mobile a:hover {
border-radius: 15px;
border: 0.5px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation .profile-sidebar-menu-mobile .li-profile.active {
border-radius: 15px;
border: 0.5px solid rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.15);
}
.sidebar-navigation .profile-sidebar-menu-mobile img {
border-radius: 50%;
width: 40px;
}
.sidebar-navigation .profile-sidebar-menu-mobile a svg {
width: 30px;
height: 30px;
color: #30C2C2;
}
/* End Profile in Mobile Section */
/* Sidebar Navigation Small */
.sidebar-navigation.small {
padding: 2rem 0.6rem !important;
width: 80px;
transition: ease .4s;
/* transition-timing-function: cubic-bezier(0.9,0,1,1); */
}
.sidebar-navigation.small .logo {
padding: 0;
width: 50px;
height: 50px;
text-align: center;
}
.sidebar-navigation.small > .sidebar-menu > ul li a span {
display: none;
transition: ease .4s;
/* transition-timing-function: cubic-bezier(0.9,0,1,1); */
}
.sidebar-navigation.small > .sidebar-menu > ul li {
border-radius: 50px;
padding: 8px 0;
margin: 6px auto;
display: flex;
align-items: center;
justify-content: center;
}
.static-menu {
z-index: 1010;
}
/* Top Header */
.toggle {
border: none;
@@ -1703,7 +1537,7 @@ button.btn-more span:nth-child(4) {
/* background: #23A8A8; */
box-shadow: 0px 1px 4px 2px rgba(0, 0, 0, 0.10);
overflow: hidden;
border: 1px solid #23A8A8;
border: 1px solid #199494;
}
.form-personal .form-control, .form-personal-step3 .form-control
@@ -1718,7 +1552,7 @@ button.btn-more span:nth-child(4) {
.form-personal .input-group-text,
.form-personal-step3 .input-group-text {
width: 130px;
background: #23A8A8;
background: #199494;
color: #ffffff;
font-size: 12px;
font-weight: 500;

View File

@@ -1,9 +1,9 @@
class AjaxService {
constructor(antiForgeryToken) {
this.antiForgeryToken = antiForgeryToken;
this.defaultHeaders = {
"Content-Type": "application/json; charset=utf-8"
};
//this.defaultHeaders = {
// "Content-Type": "application/json; charset=utf-8"
//};
}
sendRequest({ url, method = "GET", data = {}, async = true }) {
@@ -15,7 +15,7 @@
dataType: "json",
async: async,
headers: {
...this.defaultHeaders,
//...this.defaultHeaders,
"RequestVerificationToken": this.antiForgeryToken
},
success: function (response) {

View File

@@ -28,6 +28,14 @@
white-space: nowrap;
}
.positive-time {
color: #65a30d !important;
}
.negative-time {
color: #F20E0E !important;
}
.tooltipfull-container:hover .tooltipfull, a:hover .tooltipfull {
opacity: 1;
-webkit-transform: scale(1);

View File

@@ -47,6 +47,14 @@
right: 20px;
}
.positive-time {
color: #65a30d !important;
}
.negative-time {
color: #F20E0E !important;
}
.sticky {
position: sticky;
top: 0;

View File

@@ -6,7 +6,16 @@
}
.modal-dialog, .modal-content {
position: absolute;
left: 50%;
top: 50%;
-moz-transform: translate(-50%, -50%) !important;
-webkit-transform: translate(-50%, -50%) !important;
-o-transform: translate(-50%, -50%) !important;
transform: translate(-50%, -50%) !important;
height: 500px;
width: 510px;
margin: 0;
}
.groupSettingModall-width {
@@ -203,6 +212,7 @@
.modal-dialog, .modal-content {
/*height: 622px;*/
height: 600px;
width: 100%;
}
.radio-label-workTimeOption {

View File

@@ -1,5 +1,17 @@
$(document).ready(function () {
var ajaxService = new AjaxService(antiForgeryToken);
$(document).ready(function () {
loadDataCameraAccountAjax();
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
});
$(document).on('click', ".openAction", function () {

View File

@@ -1,10 +1,22 @@
var dateIndex = 0;
var ajaxService = new AjaxService(antiForgeryToken);
var dateIndex = 0;
var dateEmployeeIndex = null;
var width = $(document).width();
var height = $(document).height();
var hasData = true;
$(document).ready(function () {
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
$(".select2Option").select2({
language: "fa",
dir: "rtl"
@@ -111,6 +123,18 @@ const selectedAll = document.querySelectorAll(".wrapper-dropdown");
var wrapperDropdown = $(".wrapper-dropdown");
$(document).ready(function () {
daySelectOption();
const { day, employeeId, startDate, endDate } = getSearchParamsFromUrl();
$('#StartDate').val(startDate);
$("#EndDate").val(endDate);
$("#employeeSelect").val(employeeId).trigger('change');
if (employeeId !== "0" || startDate !== '' || endDate !== '', day !== '') {
$('.btn-clear-filter').removeClass('disable');
} else {
$('.btn-clear-filter').addClass('disable');
}
wrapperDropdown.on("click", function () {
var dropdown = $(this);
var optionsContainer = dropdown.children(".dropdown");
@@ -145,7 +169,6 @@ $(document).ready(function () {
}
$('.btn-search-click').click(function () {
$('#sumTimeWork').hide();
//if ($('#StartDate').val().trim() !=='' && validDate === false) {
@@ -177,10 +200,11 @@ $(document).ready(function () {
}
}
const { employeeId, startDate, endDate } = getSearchParamsFromUrl();
var filterEmployeeId = 0;
var filterStart = "";
var filterEnd = "";
var filterEmployeeId = employeeId;
var filterStart = startDate;
var filterEnd = endDate;
if (window.matchMedia('(max-width: 767px)').matches) {
filterEmployeeId = $('#employeeSelectMobile').val();
@@ -198,6 +222,8 @@ $(document).ready(function () {
$('.btn-clear-filter').addClass('disable');
}
paramsUrl(filterEmployeeId, filterStart, filterEnd);
hasData = true;
dateIndex = 0;
dateEmployeeIndex = null;
@@ -213,8 +239,8 @@ $(document).ready(function () {
});
$('.dropdown-days .item').on("click", function () {
let dataVal = $(this).attr("value-data-normal");
if (dataVal === "OneDay") {
let dataVal = $(this).attr("data-value-normal");
if (dataVal === "one-day") {
// $('#endDateRollcall').removeClass('d-flex');
$('#endDateRollcall').addClass('d-none');
$('#StartDate').attr("placeholder", "تاریخ");
@@ -241,7 +267,7 @@ $('.dropdown-days .item').on("click", function () {
var sendDropdownNormal = $("#sendSorting").val();
if (sendDropdownNormal) {
let itemDropdownNormal = $(".dropdown-normal").find(".item[value-data-normal='" + sendDropdownNormal + "']");
let itemDropdownNormal = $(".dropdown-normal").find(".item[data-value-normal='" + sendDropdownNormal + "']");
itemDropdownNormal.addClass("active");
var selectedNormalDisplay = $(".wrapper-dropdown-normal").find(".selected-display");
selectedNormalDisplay.text(itemDropdownNormal.text());
@@ -287,15 +313,26 @@ function caseHistoryLoadAjax() {
var html = "";
var isHolidyColor = 'garyHolidy';
var data = {
const { employeeId, startDate, endDate } = getSearchParamsFromUrl();
const data = {
dateIndex: dateIndex,
employeeId: filterEmployeeId,
startDate: filterEnd !== '' ? filterStart : '',
endDate: filterEnd,
exactDateFa: filterEnd === '' ? filterStart : '',
employeeId: employeeId,
startDate: endDate !== '' ? startDate : '',
endDate: endDate,
exactDateFa: endDate === '' ? startDate : '',
dateEmployeeIndex: dateEmployeeIndex
};
//var data = {
// dateIndex: dateIndex,
// employeeId: filterEmployeeId,
// startDate: filterEnd !== '' ? filterStart : '',
// endDate: filterEnd,
// exactDateFa: filterEnd === '' ? filterStart : '',
// dateEmployeeIndex: dateEmployeeIndex
//};
$.ajax({
async: false,
contentType: 'charset=utf-8',
@@ -404,7 +441,14 @@ function caseHistoryLoadAjax() {
<div class="Rtable-cell width4 position-relative bg-filter d-none d-md-block">
<div class="Rtable-cell--content text-center h-100">
<div class="d-md-none d-none">تاخیر در ورود: </div>
<div class="d-flex ms-1">-</div>
<div class="d-block ms-1">`;
item.rollCallTimesList.forEach(function (itemTime) {
let { timeDiff, cssClass } = getTimeDiffData(itemTime.entryTimeDifferences);
html += ` <div class="Rtable-cell--content text-center ${cssClass}">${timeDiff}</div>`;
});
html += `</div>
</div>
</div>
@@ -447,7 +491,12 @@ function caseHistoryLoadAjax() {
<div class="Rtable-cell position-relative width7 bg-filter d-none d-md-block">
<div class="Rtable-cell--content text-center h-100">
<div class="d-md-none d-none">تجمیع در خروج: </div>
<div class="d-flex ms-1">-</div>
<div class="d-block ms-1">`;
item.rollCallTimesList.forEach(function (itemTime) {
let { timeDiff, cssClass } = getTimeDiffData(itemTime.exitTimeDifferences);
html += ` <div class="Rtable-cell--content text-center ${cssClass}">${timeDiff}</div>`;
});
html +=`</div>
</div>
</div>
@@ -656,8 +705,8 @@ function caseHistoryLoadAjax() {
//html += `<div class="operations-btns-main"><div></div>`;
$.each(caseHistoryData.activeEmployees, function (i, item) {
html += `
<div class="Rtable-row align-items-center position-relative openAction employee-row ${caseHistoryData.activeEmployees.length === 1 ? "radius" : ""} ${i === 0 ? "firstRadius" : ""} ${i === caseHistoryData.activeEmployees.length-1 ? "lastRadius" : ""} ${caseHistoryData.isHoliday ? isHolidyColor : ``} ${item.hasLeave ? `leaveItem` : ``} ${!caseHistoryData.isHoliday && !item.hasLeave && item.isAbsent ? `absenceItem` : ``}">
html += `
<div class="Rtable-row align-items-center position-relative openAction employee-row ${caseHistoryData.activeEmployees.length === 1 ? "radius" : ""} ${i === 0 ? "firstRadius" : ""} ${i === caseHistoryData.activeEmployees.length - 1 ? "lastRadius" : ""} ${caseHistoryData.isHoliday ? isHolidyColor : ``} ${item.hasLeave ? `leaveItem` : ``} ${!caseHistoryData.isHoliday && !item.hasLeave && item.isAbsent ? `absenceItem` : ``}">
<div class="Rtable-cell width1">
<div class="Rtable-cell--heading d-none">
ردیف
@@ -686,7 +735,13 @@ function caseHistoryLoadAjax() {
<div class="Rtable-cell width4 position-relative bg-filter d-none d-md-block">
<div class="Rtable-cell--content text-center h-100">
<div class="d-md-none d-none">تاخیر در ورود: </div>
<div class="d-flex ms-1">-</div>
<div class="d-block ms-1">`;
item.rollCallTimesList.forEach(function (itemTime) {
let { timeDiff, cssClass } = getTimeDiffData(itemTime.entryTimeDifferences);
html += ` <div class="Rtable-cell--content text-center ${cssClass}">${timeDiff}</div>`;
});
html += `</div>
</div>
</div>
@@ -724,12 +779,17 @@ function caseHistoryLoadAjax() {
</div>`;
}
html += `</div>
html += `</div>
<div class="Rtable-cell position-relative width7 bg-filter d-none d-md-block">
<div class="Rtable-cell--content text-center h-100">
<div class="d-md-none d-none">تجمیع در خروج: </div>
<div class="d-flex ms-1">-</div>
<div class="d-block ms-1">`;
item.rollCallTimesList.forEach(function (itemTime) {
let { timeDiff, cssClass } = getTimeDiffData(itemTime.exitTimeDifferences);
html += ` <div class="Rtable-cell--content text-center ${cssClass}">${timeDiff}</div>`;
});
html +=`</div>
</div>
</div>
@@ -777,7 +837,13 @@ function caseHistoryLoadAjax() {
</div>`;
html += `<div class="width3 d-block d-md-none" style="width:1% !important;border-right: 1px dashed #CACACA;padding: 0 20px 0 7px;">-</div>`;
html += `<div class="width3 d-block d-md-none" style="width:1% !important;border-right: 1px dashed #CACACA;padding: 0 20px 0 7px;white-space: nowrap;">`;
item.rollCallTimesList.forEach(function (itemTime) {
let { timeDiff, cssClass } = getTimeDiffData(itemTime.entryTimeDifferences);
html += ` <span class="${cssClass}">${timeDiff}</span>`;
});
html += `</div>`;
html += `<div class="width4 d-block d-md-none" style="width:18% !important">`;
if (item.rollCallTimesList.length > 0) {
@@ -811,7 +877,13 @@ function caseHistoryLoadAjax() {
}
html += `</div>`;
html += `<div class="width3 d-block d-md-none" style="width:1% !important;padding: 0 0 0 20px;">-</div>`;
html += `<div class="width3 d-block d-md-none" style="width:1% !important;padding: 0 0 0 20px;white-space: nowrap;">`;
item.rollCallTimesList.forEach(function (itemTime) {
let { timeDiff, cssClass } = getTimeDiffData(itemTime.exitTimeDifferences);
html += ` <span class="${cssClass}">${timeDiff}</span>`;
});
html += `</div>`;
html += `</div>`;
@@ -1905,4 +1977,92 @@ function printAllWithPersonnel(employeeId, firstPrint, lastPrint) {
function openModalLeave(employeeId, dateFa, employeeName) {
var goTo = `#showmodal=/Client/Company/RollCall/CaseHistory?handler=LeaveCreate&Command.StartLeave=${dateFa}&Command.EmployeeId=${employeeId}&Command.EmployeeFullName=${employeeName}`;
window.location.href = goTo;
}
function getTimeDiffData(entryTimeDifferences) {
let timeDiff = entryTimeDifferences;
if (!timeDiff) {
timeDiff = "-";
}
let cssClass = '';
if (timeDiff !== "-" && timeDiff.includes('-')) {
cssClass = 'negative-time';
} else if (timeDiff !== "-" && timeDiff.includes('+')) {
cssClass = 'positive-time';
}
if (timeDiff !== "-") {
timeDiff = timeDiff.replace(/[+-]$/, '');
}
return { timeDiff, cssClass };
}
function paramsUrl(employeeId, startDate, endDate) {
const params = new URLSearchParams();
let hasAnyFilter = false
const dayDataVal = $('.dropdown-days .item.active').attr("data-value-normal");
if (dayDataVal === "one-day") {
params.set("day", dayDataVal);
hasAnyFilter = true;
} else {
params.set("day", dayDataVal);
hasAnyFilter = true;
}
if (startDate !== '') {
params.set("start-date", startDate);
hasAnyFilter = true;
}
if (endDate !== '') {
params.set("end-date", endDate);
hasAnyFilter = true;
}
if (employeeId !== "0") {
params.set("employee-id", employeeId);
hasAnyFilter = true;
}
const newUrl = hasAnyFilter
? `${window.location.origin}/Client/Company/RollCall/CaseHistory?${params.toString()}`
: `${window.location.origin}/Client/Company/RollCall/CaseHistory`;
window.history.pushState({}, '', newUrl);
}
function getSearchParamsFromUrl() {
const urlParams = new URLSearchParams(window.location.search);
return {
day: urlParams.get("day") || "",
startDate: urlParams.get("start-date") || "",
endDate: urlParams.get("end-date") || "",
employeeId: urlParams.get("employee-id") || "0"
};
}
function daySelectOption() {
const urlParams = new URLSearchParams(window.location.search);
const dayValue = urlParams.get("day") || "one-day";
const $dropdownItemsDay = $('.dropdown-days .item');
$dropdownItemsDay.removeClass('active');
$dropdownItemsDay.filter(`[data-value-normal="${dayValue}"]`).addClass('active');
const selectedDayValue = $('.dropdown-days .item.active').attr("data-value-normal");
const toggleEndDateVisibility = (isVisible) => {
const method = isVisible ? 'removeClass' : 'addClass';
$('#endDateRollcall')[method]('d-none');
$('#endDateRollcallMobile')[method]('d-none');
};
toggleEndDateVisibility(selectedDayValue !== "one-day");
}

View File

@@ -1,10 +1,22 @@
$(document).ready(function () {
var ajaxService = new AjaxService(antiForgeryToken);
$(document).ready(function () {
$('.loadingButton').on('click', function () {
var button = $(this);
var loadingDiv = button.find('.loading');
loadingDiv.show();
});
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
$(document).on('click', ".openAction", function () {
$(this).next().find(".operations-btns").slideToggle(500);
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);

View File

@@ -1,4 +1,6 @@
var pageIndexMain = 0;
var ajaxService = new AjaxService(antiForgeryToken);
var pageIndexMain = 0;
var searchName = '';
$(document).ready(function () {
@@ -8,6 +10,15 @@ $(document).ready(function () {
loadingDiv.show();
});
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
loadInfoCount();
loadDataAjax();

View File

@@ -1,9 +1,21 @@
$(document).ready(function () {
var ajaxService = new AjaxService(antiForgeryToken);
$(document).ready(function () {
$(".select2Option").select2({
language: "fa",
dir: "rtl"
});
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
$('.btn-search-click').click(function () {
var filterEmployeeId = 0;

View File

@@ -1,20 +1,36 @@
$(".openAction").click(function () {
var ajaxService = new AjaxService(antiForgeryToken);
$(".openAction").click(function () {
$(this).next().find(".operations-btns").slideToggle(500);
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
});
$(document).ready(function () {
$(this).find(".operations-btns").first().slideToggle(500);
});
$(document).ready(function () {
if (hasRollCallService) {
if (!hasCameraAccount || !hasRollCallWorkshopSetting) {
window.location.href = saveCameraAccountUrl;
ajaxService.get(statusCameraAccountAndWorkshopSettingUrl)
.then(response => {
if (response.hasRollCallService) {
if (!response.hasCameraAccount || !response.hasRollCallWorkshopSetting) {
//window.location.href = saveCameraAccountUrl;
AjaxUrlContentModal(saveCameraAccountUrl);
}
}
});
//if (hasRollCallService) {
// if (!hasCameraAccount || !hasRollCallWorkshopSetting) {
// window.location.href = saveCameraAccountUrl;
// }
//}
$('.loadingButton').on('click', function (e) {
if (e.ctrlKey || e.metaKey) {
return;
}
}
$('.loadingButton').on('click', function () {
var button = $(this);
var loadingDiv = button.find('.loading');
loadingDiv.show();