From 88fbea0a390723f6d6b4fbce1c599647faf86d15 Mon Sep 17 00:00:00 2001 From: samsys Date: Sun, 21 Jul 2024 21:05:30 +0330 Subject: [PATCH] new sidbar - client changes - vafa --- 0_Framework/Application/Version.cs | 4 +- .../AccountApplication.cs | 11 +- .../IRollCallMandatoryRepository.cs | 2 +- .../RollCall/GroupedRollCalls.cs | 10 + .../RollCall/RollCallViewModel.cs | 1 + .../InsuranceListApplication.cs | 4 +- .../Repository/RollCallMandatoryRepository.cs | 135 +- .../Company/InsuranceList/Index.cshtml.cs | 5 +- .../Company/InsuranceList/MainSearch.cshtml | 169 +- .../Admin/Pages/Shared/_AdminLayout.cshtml | 719 +-- .../Areas/Admin/Pages/Shared/_Menu.cshtml | 640 +-- .../AdminNew/Pages/Shared/_Header.cshtml | 271 +- .../AdminNew/Pages/Shared/_Layout.cshtml | 416 +- .../Areas/AdminNew/Pages/Shared/_Menu.cshtml | 870 ++-- .../Pages/Company/Checkouts/Index.cshtml | 7 +- .../Pages/Company/Contracts/Index.cshtml | 6 +- .../Company/Employees/CreateLeave.cshtml | 1141 ++--- .../Pages/Company/Employees/EditLeave.cshtml | 1175 ++--- .../Company/Employees/EditPaidLeave.cshtml | 341 +- .../Pages/Company/Employees/Leave.cshtml | 4427 ++++++++--------- .../Pages/Company/Employees/Leave.cshtml.cs | 725 +-- .../Company/Employees/LeaveCreateModal.cshtml | 1286 +++-- .../Company/PaymentToEmployee/Index.cshtml | 6 +- .../Company/Workshop/LeaveListAll.cshtml | 2 - .../Areas/Client/Pages/LeaveCreate.cshtml | 7 +- .../Areas/Client/Pages/LeaveList.cshtml | 2 - .../Client/Pages/Shared/_ClientLayout.cshtml | 24 + .../InsuranceList/546/1403_03/DSKKAR00.dbf | Bin 0 -> 1326 bytes .../InsuranceList/546/1403_03/DSKWOR00.dbf | Bin 0 -> 7098 bytes ServiceHost/Program.cs | 36 +- ServiceHost/appsettings.Development.json | 4 +- .../wwwroot/AdminTheme/assets/css/style.css | 253 +- .../Sidbar_AdminNew/sidebar_admin.css | 498 ++ .../Sidbar_AdminNew/sidebar_admin.js | 292 ++ .../wwwroot/AssetsClient/css/style.css | 50 +- .../AssetsClient/css/ticket-create.css | 205 + .../wwwroot/AssetsClient/css/ticket-list.css | 216 + .../AssetsClient/css/ticket-message.css | 159 + ServiceHost/wwwroot/AssetsClient/js/site.js | 11 +- ServiceHost/wwwroot/manifest.json | 32 +- ServiceHost/wwwroot/service-worker.js | 19 + 41 files changed, 8120 insertions(+), 6061 deletions(-) create mode 100644 CompanyManagment.App.Contracts/RollCall/GroupedRollCalls.cs create mode 100644 ServiceHost/InsuranceList/546/1403_03/DSKKAR00.dbf create mode 100644 ServiceHost/InsuranceList/546/1403_03/DSKWOR00.dbf create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.css create mode 100644 ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.js create mode 100644 ServiceHost/wwwroot/AssetsClient/css/ticket-create.css create mode 100644 ServiceHost/wwwroot/AssetsClient/css/ticket-list.css create mode 100644 ServiceHost/wwwroot/AssetsClient/css/ticket-message.css create mode 100644 ServiceHost/wwwroot/service-worker.js diff --git a/0_Framework/Application/Version.cs b/0_Framework/Application/Version.cs index 7bb85fc9..13f01541 100644 --- a/0_Framework/Application/Version.cs +++ b/0_Framework/Application/Version.cs @@ -10,8 +10,8 @@ public static class Version { static Version() { - StyleVersion = "2.11.27"; - AdminVersion = "2.5.12"; + StyleVersion = "2.11.28"; + AdminVersion = "2.5.13"; CameraVersion = "1.0.3"; } diff --git a/AccountManagement.Application/AccountApplication.cs b/AccountManagement.Application/AccountApplication.cs index c178b633..96dc7c34 100644 --- a/AccountManagement.Application/AccountApplication.cs +++ b/AccountManagement.Application/AccountApplication.cs @@ -183,14 +183,21 @@ public class AccountApplication : IAccountApplication public OperationResult Login(Login command) { + long idAutoriz = 0; var operation = new OperationResult(); - var account = _accountRepository.GetBy(command.Username); + if (string.IsNullOrWhiteSpace(command.Password)) + return operation.Failed(ApplicationMessages.EmptyPassword); + + if (string.IsNullOrWhiteSpace(command.Username)) + return operation.Failed(ApplicationMessages.EmptyUsername); + + var account = _accountRepository.GetBy(command.Username); var cameraAccount = _cameraAccountRepository.GetBy(command.Username); if (account == null && cameraAccount == null) return operation.Failed(ApplicationMessages.WrongUserPass); - if (account != null) + if (account != null) { (bool Verified, bool NeedUpgrade) result = _passwordHasher.Check(account.Password, command.Password); if (!result.Verified) diff --git a/Company.Domain/RollCallAgg/IRollCallMandatoryRepository.cs b/Company.Domain/RollCallAgg/IRollCallMandatoryRepository.cs index defebee0..897b4ff7 100644 --- a/Company.Domain/RollCallAgg/IRollCallMandatoryRepository.cs +++ b/Company.Domain/RollCallAgg/IRollCallMandatoryRepository.cs @@ -8,5 +8,5 @@ namespace Company.Domain.RollCallAgg; public interface IRollCallMandatoryRepository : IRepository { ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, long leavId); - + TimeSpan AfterSubtract(CreateWorkingHoursTemp command, TimeSpan sumOneDaySpan, DateTime creationDate); } \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/RollCall/GroupedRollCalls.cs b/CompanyManagment.App.Contracts/RollCall/GroupedRollCalls.cs new file mode 100644 index 00000000..90a2e52f --- /dev/null +++ b/CompanyManagment.App.Contracts/RollCall/GroupedRollCalls.cs @@ -0,0 +1,10 @@ +using System; + +namespace CompanyManagment.App.Contracts.RollCall; + +public class GroupedRollCalls +{ + public TimeSpan SumOneDaySpan { get; set; } + public TimeSpan AfterSubtractRestSpan { get; set; } + public DateTime CreationDate { get; set; } +} \ No newline at end of file diff --git a/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs b/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs index 9f2b5164..131f83f8 100644 --- a/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs +++ b/CompanyManagment.App.Contracts/RollCall/RollCallViewModel.cs @@ -13,4 +13,5 @@ public class RollCallViewModel public int Year { get; set; } public int Month { get; set; } public TimeSpan ShiftSpan { get; set; } + public DateTime CreationDate { get; set; } } \ No newline at end of file diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index 6be19ed0..b1ceb191 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -661,8 +661,10 @@ public class InsuranceListApplication: IInsuranceListApplication employeeDetailsForInsuranceObj.LeftWorkDateGr = item.LeftWorkDateGr; employeeDetailsForInsuranceObj.StartWorkDateGr = item.StartWorkDateGr; + if (item.EmployeeId == 42783) + employeeDetailsForInsuranceObj.MonthlyBenefits = 88000000; - list.Add(employeeDetailsForInsuranceObj); + list.Add(employeeDetailsForInsuranceObj); } list = list.OrderByDescending(x => x.HasLeftWorkInMonth).ThenByDescending(x => x.HasStartWorkInMonth) diff --git a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs index cb45d16c..8b3d7c21 100644 --- a/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs +++ b/CompanyManagment.EFCore/Repository/RollCallMandatoryRepository.cs @@ -12,6 +12,7 @@ using CompanyManagment.App.Contracts.RollCall; using CompanyManagment.App.Contracts.WorkingHoursTemp; + namespace CompanyManagment.EFCore.Repository; public class RollCallMandatoryRepository : RepositoryBase, IRollCallMandatoryRepository @@ -41,16 +42,29 @@ public class RollCallMandatoryRepository : RepositoryBase, IRoll string overMandatoryHours = "0"; string overMandatoryMinuts = "0"; #endregion + + var rollCallResult = _context.RollCalls.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date && x.StartDate.Value.Date <= contractEnd.Date && x.EndDate != null).Select(x => new RollCallViewModel() { StartDate = x.StartDate, EndDate = x.EndDate, - ShiftSpan = (x.EndDate.Value - x.StartDate.Value) + ShiftSpan = (x.EndDate.Value - x.StartDate.Value), + CreationDate = x.CreationDate, }).ToList(); - var sumSpans = new TimeSpan(rollCallResult.Sum(x => x.ShiftSpan.Ticks)); - + var groupedRollCall = rollCallResult.GroupBy(x=>x.CreationDate).Select(x => new GroupedRollCalls() + { + CreationDate = x.Key, + SumOneDaySpan = new TimeSpan(x.Sum(x => x.ShiftSpan.Ticks)), + }).ToList(); + var rollCallSubtractSpan = groupedRollCall.Select(x => new GroupedRollCalls() + { + CreationDate = x.CreationDate, + AfterSubtractRestSpan = AfterSubtract(command,x.SumOneDaySpan,x.CreationDate), + }).ToList(); + var sumSpans = new TimeSpan(rollCallSubtractSpan.Sum(x => x.AfterSubtractRestSpan.Ticks)); + //***********************************// //ToTalHourse Employe eWorked var totalHourses = (sumSpans.TotalMinutes) / 60; @@ -298,6 +312,121 @@ public class RollCallMandatoryRepository : RepositoryBase, IRoll return new ComputingViewModel(); } + public TimeSpan AfterSubtract(CreateWorkingHoursTemp command,TimeSpan sumOneDaySpan,DateTime creationDate) + { + #region RestTimes + var rest0 = new TimeSpan(); + var rest1 = new TimeSpan(); + var rest2 = new TimeSpan(); + var rest3 = new TimeSpan(); + var rest4 = new TimeSpan(); + var rest5 = new TimeSpan(); + var rest6 = new TimeSpan(); + switch (command.ShiftWork) + { + case "1": + case "2": + command.RestTime = command.RestTime == "0" ? "00" : command.RestTime; + command.RestTimeYekshanbeh = command.RestTimeYekshanbeh == "0" ? "00" : command.RestTimeYekshanbeh; + command.RestTimeDoshanbeh = command.RestTimeDoshanbeh == "0" ? "00" : command.RestTimeDoshanbeh; + command.RestTimeSeshanbeh = command.RestTimeSeshanbeh == "0" ? "00" : command.RestTimeSeshanbeh; + command.RestTimeCheharshanbeh = + command.RestTimeCheharshanbeh == "0" ? "00" : command.RestTimeCheharshanbeh; + command.RestTimePanjshanbeh = command.RestTimePanjshanbeh == "0" ? "00" : command.RestTimePanjshanbeh; + command.RestTimeJomeh = command.RestTimeJomeh == "0" ? "00" : command.RestTimeJomeh; + command.RestTimeMin = command.RestTimeMin == "0" ? "00" : command.RestTimeMin; + command.RestTimeYekshanbehMin = + command.RestTimeYekshanbehMin == "0" ? "00" : command.RestTimeYekshanbehMin; + command.RestTimeDoshanbehMin = + command.RestTimeDoshanbehMin == "0" ? "00" : command.RestTimeDoshanbehMin; + command.RestTimeSeshanbehMin = + command.RestTimeSeshanbehMin == "0" ? "00" : command.RestTimeSeshanbehMin; + command.RestTimeCheharshanbehMin = + command.RestTimeCheharshanbehMin == "0" ? "00" : command.RestTimeCheharshanbehMin; + command.RestTimePanjshanbehMin = + command.RestTimePanjshanbehMin == "0" ? "00" : command.RestTimePanjshanbehMin; + command.RestTimeJomehMin = command.RestTimeJomehMin == "0" ? "00" : command.RestTimeJomehMin; + + rest0 = TimeSpan.Parse($"{command.RestTime}:{command.RestTimeMin}"); + rest1 = TimeSpan.Parse($"{command.RestTimeYekshanbeh}:{command.RestTimeYekshanbehMin}"); + rest2 = TimeSpan.Parse($"{command.RestTimeDoshanbeh}:{command.RestTimeDoshanbehMin}"); + rest3 = TimeSpan.Parse($"{command.RestTimeSeshanbeh}:{command.RestTimeSeshanbehMin}"); + rest4 = TimeSpan.Parse($"{command.RestTimeCheharshanbeh}:{command.RestTimeCheharshanbehMin}"); + rest5 = TimeSpan.Parse($"{command.RestTimePanjshanbeh}:{command.RestTimePanjshanbehMin}"); + rest6 = TimeSpan.Parse($"{command.RestTimeJomeh}:{command.RestTimeJomehMin}"); + break; + case "4": + command.RestTimeShanbe1 = command.RestTimeShanbe1 == "0" ? "00" : command.RestTimeShanbe1; + command.RestTimeShanbe1Min = command.RestTimeShanbe1Min == "0" ? "00" : command.RestTimeShanbe1Min; + command.RestTimeYekShanbe1 = command.RestTimeYekShanbe1 == "0" ? "00" : command.RestTimeYekShanbe1; + command.RestTimeYekShanbe1Min = + command.RestTimeYekShanbe1Min == "0" ? "00" : command.RestTimeYekShanbe1Min; + command.RestTimeDoShanbe1 = command.RestTimeDoShanbe1 == "0" ? "00" : command.RestTimeDoShanbe1; + command.RestTimeDoShanbe1Min = + command.RestTimeDoShanbe1Min == "0" ? "00" : command.RestTimeDoShanbe1Min; + command.RestTimeSeShanbe1 = command.RestTimeSeShanbe1 == "0" ? "00" : command.RestTimeSeShanbe1; + command.RestTimeSeShanbe1Min = + command.RestTimeSeShanbe1Min == "0" ? "00" : command.RestTimeSeShanbe1Min; + command.RestTimeCheharShanbe1 = + command.RestTimeCheharShanbe1 == "0" ? "00" : command.RestTimeCheharShanbe1; + command.RestTimeCheharShanbe1Min = + command.RestTimeCheharShanbe1Min == "0" ? "00" : command.RestTimeCheharShanbe1Min; + command.RestTimePanjShanbe1 = command.RestTimePanjShanbe1 == "0" ? "00" : command.RestTimePanjShanbe1; + command.RestTimePanjShanbe1Min = + command.RestTimePanjShanbe1Min == "0" ? "00" : command.RestTimePanjShanbe1Min; + command.RestTimeJome1 = command.RestTimeJome1 == "0" ? "00" : command.RestTimeJome1; + command.RestTimeJome1Min = command.RestTimeJome1Min == "0" ? "00" : command.RestTimeJome1Min; + + // sumrest week1 + rest0 = TimeSpan.Parse($"{command.RestTimeShanbe1}:{command.RestTimeShanbe1Min}"); + rest1 = TimeSpan.Parse($"{command.RestTimeYekShanbe1}:{command.RestTimeYekShanbe1Min}"); + rest2 = TimeSpan.Parse($"{command.RestTimeDoShanbe1}:{command.RestTimeDoShanbe1Min}"); + rest3 = TimeSpan.Parse($"{command.RestTimeSeShanbe1}:{command.RestTimeSeShanbe1Min}"); + rest4 = TimeSpan.Parse($"{command.RestTimeCheharShanbe1}:{command.RestTimeCheharShanbe1Min}"); + rest5 = TimeSpan.Parse($"{command.RestTimePanjShanbe1}:{command.RestTimePanjShanbe1Min}"); + rest6 = TimeSpan.Parse($"{command.RestTimeJome1}:{command.RestTimeJome1Min}"); + break; + } + //week1 + + + #endregion + + var result = new TimeSpan(); + switch (creationDate.DayOfWeek) + { + case DayOfWeek.Saturday: + if (sumOneDaySpan >= rest0) + result = sumOneDaySpan.Subtract(rest0); + break; + case DayOfWeek.Sunday: + if (sumOneDaySpan >= rest1) + result = sumOneDaySpan.Subtract(rest1); + break; + case DayOfWeek.Monday: + if (sumOneDaySpan >= rest2) + result = sumOneDaySpan.Subtract(rest2); + break; + case DayOfWeek.Tuesday: + if (sumOneDaySpan >= rest3) + result = sumOneDaySpan.Subtract(rest3); + break; + case DayOfWeek.Wednesday: + if (sumOneDaySpan >= rest4) + result = sumOneDaySpan.Subtract(rest4); + break; + case DayOfWeek.Thursday: + if (sumOneDaySpan >= rest5) + result = sumOneDaySpan.Subtract(rest5); + break; + case DayOfWeek.Friday: + if (sumOneDaySpan >= rest6) + result = sumOneDaySpan.Subtract(rest6); + break; + } + + return result; + } } \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs index e5db3259..3f2bd274 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml.cs @@ -823,7 +823,9 @@ public class IndexModel : PageModel string benefitsIncludedContinuous, string jobId, string housingAllowance, string includeStatus, string consumableItems, string endMonthCurrentDay, long employeeId, double maritalStatus) { + var benefitsIncludedContinuousL = benefitsIncludedContinuous.MoneyToDouble(); + double sum = 0; var employeeMaritalStatus = _employeeApplication.GetDetails(employeeId); if (employeeMaritalStatus.MaritalStatus == "متاهل") @@ -840,7 +842,8 @@ public class IndexModel : PageModel if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum; - + if (employeeId == 42783) + benefitsIncludedContinuousL = 88000000; if (workingDaysL < endMonthCurrentDayL) { if (endMonthCurrentDayL == 29) diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/MainSearch.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/MainSearch.cshtml index fe5d3f02..df9e2e06 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/MainSearch.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/MainSearch.cshtml @@ -28,97 +28,100 @@ } @{ var currentAccout = AuthHelper.CurrentAccountInfo(); } @**@ - - - - - - - - - - - - - - - - - +
+
#سال ماه کدکارگاهینام کارفرمانام کارگاهنوع ارسال لیستشعبه تامین اجتماعیشهرستانلیست مقطوععملیات
+ + + + + + + + + + + + + + + + - @foreach (var item in Model.MainList) - { - - - - - - - - - - - - @{ - var pathDSKKAR00 = item.WorkShopId + "\\" + item.Year + "_" + item.MonthNumber + "\\DSKKAR00.dbf"; - var pathDSKWOR00 = item.WorkShopId + "\\" + item.Year + "_" + item.MonthNumber + "\\DSKWOR00.dbf"; - } - + + + + + + + + + + + @{ + var pathDSKKAR00 = item.WorkShopId + "\\" + item.Year + "_" + item.MonthNumber + "\\DSKKAR00.dbf"; + var pathDSKWOR00 = item.WorkShopId + "\\" + item.Year + "_" + item.MonthNumber + "\\DSKWOR00.dbf"; + } + - - i = i + 1; - } - -
#سال ماه کدکارگاهینام کارفرمانام کارگاهنوع ارسال لیستشعبه تامین اجتماعیشهرستانلیست مقطوععملیات
@i @item.Year@item.Month@item.WorkShopCode -
-

@item.EmployerName

- @item.EmployerName -
-
-
-

@item.WorkShopName

- @item.WorkShopName -
-
@item.TypeOfInsuranceSend@item.Branch@item.City@item.StrFixedSalary + @foreach (var item in Model.MainList) + { +
@i @item.Year@item.Month@item.WorkShopCode +
+

@item.EmployerName

+ @item.EmployerName +
+
+
+

@item.WorkShopName

+ @item.WorkShopName +
+
@item.TypeOfInsuranceSend@item.Branch@item.City@item.StrFixedSalary - @if ((currentAccout.RoleId == 1 && item.ConfirmSentlist) || !item.ConfirmSentlist) - { - - - - - - - - - - } - @* - - *@ - - - - + @if ((currentAccout.RoleId == 1 && item.ConfirmSentlist) || !item.ConfirmSentlist) + { + + + + + + + + + + } + @* + + *@ + + + + + + + @* - - @* - - *@ + *@ - @* Download DBF File*@ - - - - - - + @* Download DBF File*@ + + + + + + -
+ + + i = i + 1; + } + + + + @Html.AntiForgeryToken() diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml index 377d8a2c..16574599 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_AdminLayout.cshtml @@ -1,39 +1,48 @@ -@using Version = _0_Framework.Application.Version +@using Microsoft.AspNetCore.Razor.Language.Intermediate +@using _0_Framework.Application +@using Version = _0_Framework.Application.Version +@inject _0_Framework.Application.IAuthHelper AuthHelper; + +@{ + var currentAccount = AuthHelper.CurrentAccountInfo(); +} + - - - - + + + + - + گزارشگیر @ViewData["Title"] - @ViewData["Title"] | دادمهر گستر + - - + + - - - - - - + + + + + + - - + + - - + + + + + + + @**@ - - @**@ - - - - - - - - - - + + + + + + + - - - @* *@ - - @RenderSection("Styles", false) + + +@* *@ + + @RenderSection("Styles", false) - -
+ +
- -
- - - - +
+ + + - - - - -
- -
- -
- - @RenderBody() - -
- -
- -
- 2021 © Dadmehr Gostar. -
- -
- - -
- - + + + + +
+ +
+ +
+ + @RenderBody() + +
+ +
+ +@*
+ 2021 © Dadmehr Gostar. +
+ *@ +
+ + - + + + - -
- -@**@ + + + - - - - - - - - - - - - - - - - - - - -@* + + @* @@ -259,42 +317,44 @@ *@ - - - -@**@ + + + + @**@ - - + + - - + + - - + + - - + + + - + -@* *@ + @* *@ + -@RenderSection("Script", false) -@RenderSection("PanelScripts", false) + @RenderSection("Script", false) + @RenderSection("PanelScripts", required: false) @**@ - + diff --git a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml index ec8b68c1..821fc54c 100644 --- a/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Shared/_Menu.cshtml @@ -1,324 +1,354 @@ -@using _0_Framework.Application +@using System.Reflection.Metadata @*@using _0_Framework.Infrastructure*@ -@inject IAuthHelper AuthHelper; +@inject _0_Framework.Application.IAuthHelper AuthHelper; @{ - - var currentAccout = AuthHelper.CurrentAccountInfo(); + + + var currentAccout = AuthHelper.CurrentAccountInfo(); }
+
@*@section Script { @@ -362,4 +392,4 @@ // add class active to the item: }).addClass('active'); -}*@ \ No newline at end of file +}*@ diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Header.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Header.cshtml index 752fc070..423c6252 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Header.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Header.cshtml @@ -1,161 +1,132 @@ -@using _0_Framework.Application -@inject IAuthHelper AuthHelper; +@using System.Reflection.Metadata +@inject _0_Framework.Application.IAuthHelper AuthHelper; @{ - var currentAccout = AuthHelper.CurrentAccountInfo(); + var currentAccout = AuthHelper.CurrentAccountInfo(); }
- - -
+ + +
- -
- -
+ +
+ +
- -
+ +
- - - - - +@* + + + + - - - - - + + + + + - - - - - - + + + + + + *@ - +
- -
-
- -
- - +
+ +
- - \ No newline at end of file + + diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml index 8139a5d7..82fee62e 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Layout.cshtml @@ -1,225 +1,305 @@ -@using Version = _0_Framework.Application.Version +@using Microsoft.AspNetCore.Razor.Language.Intermediate +@using Version = _0_Framework.Application.Version + - - - + + + - گزارشگیر @ViewData["Title"] + گزارشگیر @ViewData["Title"] - + - - - - - - - - - - + + + + + + + + + + + - + - + - @RenderSection("Styles", false) + @RenderSection("Styles", false) -
- - +
+ + -
-
- @RenderBody() -
-
+
+
+ @RenderBody() +
+
- + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + -@* *@ + - *@ - var url = window.location.href.split('?')[0]; - var url2 = window.location.href.split('#')[0]; + + if ($('.sidebar-navigation').not('small')) { + $(".open-submenu").click(function () { + $(this).find('.ul-open-submenu').slideToggle(); + }) + } else { -@RenderSection("Script", false) + } + + $(document).ready(function() { + $('input[type="text"], input[type="number"], textarea').each(function() { + $(this).on('input', function() { + var enteredValue = $(this).val(); + var englishNumbers = convertPersianNumbersToEnglish(enteredValue); + $(this).val(englishNumbers); + }); + }); + }); + + function convertPersianNumbersToEnglish(input) { + var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g]; + var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g]; + + var str = input; + for (var i = 0; i < 10; i++) { + str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i); + } + return str; + } + + + // sidebar submenu + $(document).ready(function() { + $(".MainMenuItem").click(function() { + var submenu = $(this).next(".list-unstyled"); + + if (submenu.is(":visible")) { + submenu.slideUp("fast"); + $(this).find(".md-remove").removeClass("md-remove").addClass("md-add"); + } else { + $(".list-unstyled").slideUp("fast"); + $(".MainMenuItem").find(".md-remove").removeClass("md-remove").addClass("md-add"); + + submenu.slideToggle("fast"); + $(this).find(".md-add").removeClass("md-add").addClass("md-remove"); + } + }); + + function activateLink(selector, subMenuClass) { + $(selector).filter(function() { + if (this.href == url || this.href == url2) { + $(".list-unstyled").slideUp(350); + $(subMenuClass).slideDown(350); + $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active'); + } + }); + } + + var url = window.location.href; + var url2 = window.location.href.split('#')[0]; + + $('.btnDashboard').filter(function() { + if (this.href == url || this.href == url2) { + $(this).addClass('active'); + }; + }); + + activateLink('.clik', '.sdf1'); + activateLink('.clik2', '.sdf2'); + activateLink('.clik3', '.sdf3'); + activateLink('.clik4', '.sdf4'); + activateLink('.clik5', '.sdf5'); + activateLink('.clik6', '.sdf6'); + activateLink('.clik7', '.sdf7'); + activateLink('.clik8', '.sdf8'); + }); + + + @RenderSection("Script", false) \ No newline at end of file diff --git a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml index cfbbce84..b18bfefb 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Shared/_Menu.cshtml @@ -1,15 +1,17 @@ -@using _0_Framework.Application +@using System.Reflection.Metadata +@using AccountManagement.Application.Contracts.Account @using CompanyManagment.App.Contracts.FinancialStatment @using CompanyManagment.App.Contracts.PersonalContractingParty -@inject IAuthHelper AuthHelper; + +@inject _0_Framework.Application.IAuthHelper AuthHelper; @inject IFinancialStatmentApplication FinancialStatment; @inject IPersonalContractingPartyApp ContractingPartyApp; @{ - var currentAccout = AuthHelper.CurrentAccountInfo(); - var statmentInfo = ContractingPartyApp.GetContractingpartyIdByAccountId(currentAccout.Id); + var currentAccout = AuthHelper.CurrentAccountInfo(); + var statmentInfo = ContractingPartyApp.GetContractingpartyIdByAccountId(currentAccout.Id); - \ No newline at end of file + function dateValidcheck(inputField1) { + + let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g], + arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g], + fixNumbers = function (str) { + if (typeof str === 'string') { + for (var i = 0; i < 10; i++) { + str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i); + } + } + return str; + }; + let getdate = inputField1.value; + + let m1, m2; + let y1, y2, y3, y4; + let d1, d2; + let s1, s2; + for (var i = 0; i < getdate.length; i++) { + if (i === 0) { + y1 = fixNumbers(getdate[i]); + } + if (i === 1) { + y2 = fixNumbers(getdate[i]); + } + if (i === 2) { + y3 = fixNumbers(getdate[i]); + } + if (i === 3) { + y4 = fixNumbers(getdate[i]); + } + if (i === 4) { + s1 = fixNumbers(getdate[i]); + } + if (i === 5) { + m1 = fixNumbers(getdate[i]); + } + if (i === 6) { + m2 = fixNumbers(getdate[i]); + } + if (i === 7) { + s2 = fixNumbers(getdate[i]); + } + if (i === 8) { + d1 = fixNumbers(getdate[i]); + } + if (i === 9) { + d2 = fixNumbers(getdate[i]); + } + + } + let yRes = y1 + y2 + y3 + y4; + let year = parseInt(yRes); + let mRes = m1 + m2; + let month = parseInt(mRes); + let dRes = d1 + d2; + let day = parseInt(dRes); + let fixResult = yRes + s1 + mRes + s2 + dRes; + let test1 = checkEnValid(inputField1.value); + + let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult); + + + if (isValid && test1) { + // inputField1.style.backgroundColor = '#a6e9a6'; + start1valid = true; + + + } else { + + if (inputField1.value != "") { + // inputField1.style.backgroundColor = '#f94c4c'; + $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید"); + start1valid = false; + } + + + } + return start1valid; + + } + + function checkEnValid(fixDate1) { + + let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g], + arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g], + fixNumbers = function (str) { + if (typeof str === 'string') { + for (var i = 0; i < 10; i++) { + str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i); + } + } + return str; + }; + let getdate = fixDate1; + + let m1, m2; + let y1, y2, y3, y4; + let d1, d2; + for (let i = 0; i < getdate.length; i++) { + if (i === 0) { + y1 = fixNumbers(getdate[i]); + } + if (i === 1) { + y2 = fixNumbers(getdate[i]); + } + if (i === 2) { + y3 = fixNumbers(getdate[i]); + } + if (i === 3) { + y4 = fixNumbers(getdate[i]); + } + if (i === 5) { + m1 = fixNumbers(getdate[i]); + } + if (i === 6) { + m2 = fixNumbers(getdate[i]); + } + if (i === 8) { + d1 = fixNumbers(getdate[i]); + } + if (i === 9) { + d2 = fixNumbers(getdate[i]); + } + } + let yRes = y1 + y2 + y3 + y4; + let year = parseInt(yRes); + let mRes = m1 + m2; + let month = parseInt(mRes); + let dRes = d1 + d2; + let day = parseInt(dRes); + let kabiseh = false; + if (month <= 6 && day > 31) { + return false; + } else if (month > 6 && month < 12 && day > 30) { + return false; + } else if (month === 12) { + + switch (year) { + case 1346: + kabiseh = true; + break; + case 1350: + kabiseh = true; + break; + case 1354: + kabiseh = true; + break; + case 1358: + kabiseh = true; + break; + case 1362: + kabiseh = true; + break; + case 1366: + kabiseh = true; + break; + case 1370: + kabiseh = true; + break; + case 1375: + kabiseh = true; + break; + case 1379: + kabiseh = true; + break; + case 1383: + kabiseh = true; + break; + case 1387: + kabiseh = true; + break; + case 1391: + kabiseh = true; + break; + case 1395: + kabiseh = true; + break; + case 1399: + kabiseh = true; + break; + case 1403: + kabiseh = true; + break; + case 1408: + kabiseh = true; + break; + case 1412: + kabiseh = true; + break; + case 1416: + kabiseh = true; + break; + case 1420: + kabiseh = true; + break; + case 1424: + kabiseh = true; + break; + case 1428: + kabiseh = true; + break; + case 1432: + kabiseh = true; + break; + case 1436: + kabiseh = true; + break; + case 1441: + kabiseh = true; + break; + case 1445: + kabiseh = true; + break; + default: + kabiseh = false; + + } + if (kabiseh == true && day > 30) { + return false; + } else if (kabiseh == false && day > 29) { + return false; + } else { + return true; + } + } else { + return true; + } + } + + + + + + + + + + $('input:radio[name="PaidLeaveType"]').change(function () { + if ($(this).is(':checked') && $(this).val() == 'روزانه') { + $("#hours").val(''); + $("#hours").attr("disabled", "disabled"); + $("#endLeave").removeAttr("disabled"); + $('.endLeaveLabal').show(); + $('#StartHoures').removeClass("invalidTime"); + $('#StartHoures').val(''); + $('#EndHours').removeClass("invalidTime"); + $('#EndHours').val(''); + $("#endLeave").show(); + $('.res').remove(); + $('.validTime').removeClass("validTime"); + $('.sumHourseDiv').hide(); + $('.sumDaysDiv').show(); + } else if ($(this).is(':checked') && $(this).val() == 'ساعتی') { + $("#endLeave").val(''); + $("#endLeave").attr("disabled", "disabled"); + $("#endLeave").hide(); + $('.endLeaveLabal').hide(); + $("#hours").removeAttr("disabled"); + $('.sumHourseDiv').show(); + $('.sumDaysDiv').hide(); + } + }); + /////////////////Time Input Validatet///////////////// + + $('#StartHoures').on("keyup", + function () { + var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val()); + if (isValid) { + $(this).addClass("validTime"); + $(this).removeClass("invalidTime"); + if ($('#EndHours').hasClass('validTime') && $('#EndHours').val() != null) { + computeHourse(); + } + } else { + $(this).removeClass("validTime"); + $(this).addClass("invalidTime"); + } + }); + $('#EndHours').on("keyup", + function () { + var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val()); + if (isValid) { + $(this).addClass("validTime"); + $(this).removeClass("invalidTime"); + if ($('#StartHoures').hasClass('validTime') && $('#StartHoures').val() != null) { + computeHourse(); + } + } else { + $(this).removeClass("validTime"); + $(this).addClass("invalidTime"); + } + }); + + function computeHourse() { + $('.res').remove(); + $.ajax({ + /* contentType: 'charset=utf-8',*/ + async: false, + dataType: 'json', + type: 'GET', + url: '@Url.Page("/Company/Employees/Leave", "ComputeLeaveHourly")', + headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() }, + data: { "startHours": $('#StartHoures').val(), "endHours": $('#EndHours').val() }, + success: function (response) { + let res = `${response.res}`; + $('.sumHours').append(res); + }, + failure: function (response) { + console.log(5, response); + } + }); + } + + function computeDays() { + $('.resultDays').remove(); + $.ajax({ + /* contentType: 'charset=utf-8',*/ + async: false, + dataType: 'json', + type: 'GET', + url: '@Url.Page("/Company/Employees/Leave", "ComputeLeaveDaily")', + headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() }, + data: { "startDay": $('#StartLeave').val(), "endDay": $('#EndLeave').val() }, + success: function (response) { + if (response.status == false) { + $('.sumDays').addClass("note"); + } else { + $('.sumDays').removeClass("note"); + } + let res = `${response.res}`; + $('.sumDays').append(res); + }, + failure: function (response) { + console.log(5, response); + } + }); + } + }); + diff --git a/ServiceHost/Areas/Client/Pages/Company/Employees/EditLeave.cshtml b/ServiceHost/Areas/Client/Pages/Company/Employees/EditLeave.cshtml index 5095c0a2..c1873796 100644 --- a/ServiceHost/Areas/Client/Pages/Company/Employees/EditLeave.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/Employees/EditLeave.cshtml @@ -1,7 +1,7 @@ @model CompanyManagment.App.Contracts.Leave.EditLeave @{ - \ No newline at end of file + let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g], + arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g], + fixNumbers = function (str) { + if (typeof str === 'string') { + for (var i = 0; i < 10; i++) { + str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i); + } + } + return str; + }; + let getdate = fixDate1; + + let m1, m2; + let y1, y2, y3, y4; + let d1, d2; + for (let i = 0; i < getdate.length; i++) { + if (i === 0) { + y1 = fixNumbers(getdate[i]); + } + if (i === 1) { + y2 = fixNumbers(getdate[i]); + } + if (i === 2) { + y3 = fixNumbers(getdate[i]); + } + if (i === 3) { + y4 = fixNumbers(getdate[i]); + } + if (i === 5) { + m1 = fixNumbers(getdate[i]); + } + if (i === 6) { + m2 = fixNumbers(getdate[i]); + } + if (i === 8) { + d1 = fixNumbers(getdate[i]); + } + if (i === 9) { + d2 = fixNumbers(getdate[i]); + } + } + let yRes = y1 + y2 + y3 + y4; + let year = parseInt(yRes); + let mRes = m1 + m2; + let month = parseInt(mRes); + let dRes = d1 + d2; + let day = parseInt(dRes); + let kabiseh = false; + if (month <= 6 && day > 31) { + return false; + } else if (month > 6 && month < 12 && day > 30) { + return false; + } else if (month === 12) { + + switch (year) { + case 1346: + kabiseh = true; + break; + case 1350: + kabiseh = true; + break; + case 1354: + kabiseh = true; + break; + case 1358: + kabiseh = true; + break; + case 1362: + kabiseh = true; + break; + case 1366: + kabiseh = true; + break; + case 1370: + kabiseh = true; + break; + case 1375: + kabiseh = true; + break; + case 1379: + kabiseh = true; + break; + case 1383: + kabiseh = true; + break; + case 1387: + kabiseh = true; + break; + case 1391: + kabiseh = true; + break; + case 1395: + kabiseh = true; + break; + case 1399: + kabiseh = true; + break; + case 1403: + kabiseh = true; + break; + case 1408: + kabiseh = true; + break; + case 1412: + kabiseh = true; + break; + case 1416: + kabiseh = true; + break; + case 1420: + kabiseh = true; + break; + case 1424: + kabiseh = true; + break; + case 1428: + kabiseh = true; + break; + case 1432: + kabiseh = true; + break; + case 1436: + kabiseh = true; + break; + case 1441: + kabiseh = true; + break; + case 1445: + kabiseh = true; + break; + default: + kabiseh = false; + + } + if (kabiseh == true && day > 30) { + return false; + } else if (kabiseh == false && day > 29) { + return false; + } else { + return true; + } + } else { + return true; + } + } + + + + + + + + + + $('input:radio[name="PaidLeaveType"]').change(function () { + if ($(this).is(':checked') && $(this).val() == 'روزانه') { + $("#hours").val(''); + $("#hours").attr("disabled", "disabled"); + $("#endLeave").removeAttr("disabled"); + $('.endLeaveLabal').show(); + // $('#StartHoures').removeClass("invalidTime"); + // $('#StartHoures').val(''); + // $('#EndHours').removeClass("invalidTime"); + // $('#EndHours').val(''); + $("#endLeave").show(); + $('.res').remove(); + $('.validTime').removeClass("validTime"); + $('.sumHourseDiv').hide(); + $('.sumDaysDiv').show(); + } else if ($(this).is(':checked') && $(this).val() == 'ساعتی') { + // $("#endLeave").val(''); + $("#endLeave").attr("disabled", "disabled"); + $("#endLeave").hide(); + $('.endLeaveLabal').hide(); + $("#hours").removeAttr("disabled"); + $('.sumHourseDiv').show(); + $('.sumDaysDiv').hide(); + } + }); + /////////////////Time Input Validatet///////////////// + + $('#StartHoures').on("keyup", + function () { + var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val()); + if (isValid) { + $(this).addClass("validTime"); + $(this).removeClass("invalidTime"); + if ($('#EndHours').hasClass('validTime') && $('#EndHours').val() != null) { + computeHourse(); + } + } else { + $(this).removeClass("validTime"); + $(this).addClass("invalidTime"); + } + }); + $('#EndHours').on("keyup", + function () { + var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val()); + if (isValid) { + $(this).addClass("validTime"); + $(this).removeClass("invalidTime"); + if ($('#StartHoures').hasClass('validTime') && $('#StartHoures').val() != null) { + computeHourse(); + } + } else { + $(this).removeClass("validTime"); + $(this).addClass("invalidTime"); + } + }); + + function computeHourse() { + $('.res').remove(); + $.ajax({ + /* contentType: 'charset=utf-8',*/ + async: false, + dataType: 'json', + type: 'GET', + url: '@Url.Page("/Company/Employees/Leave", "ComputeLeaveHourly")', + headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() }, + data: { "startHours": $('#StartHoures').val(), "endHours": $('#EndHours').val() }, + success: function (response) { + let res = `${response.res}`; + $('.sumHours').append(res); + }, + failure: function (response) { + console.log(5, response); + } + }); + } + + function computeDays() { + $('.resultDays').remove(); + $.ajax({ + /* contentType: 'charset=utf-8',*/ + async: false, + dataType: 'json', + type: 'GET', + url: '@Url.Page("/Company/Employees/Leave", "ComputeLeaveDaily")', + headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() }, + data: { "startDay": $('#StartLeave').val(), "endDay": $('#EndLeave').val() }, + success: function (response) { + if (response.status == false) { + $('.sumDays').addClass("note"); + } else { + $('.sumDays').removeClass("note"); + } + let res = `${response.res}`; + $('.sumDays').append(res); + }, + failure: function (response) { + console.log(5, response); + } + }); + } + }); + diff --git a/ServiceHost/Areas/Client/Pages/Company/Employees/EditPaidLeave.cshtml b/ServiceHost/Areas/Client/Pages/Company/Employees/EditPaidLeave.cshtml index d5dffd88..6728328c 100644 --- a/ServiceHost/Areas/Client/Pages/Company/Employees/EditPaidLeave.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/Employees/EditPaidLeave.cshtml @@ -1,12 +1,12 @@ @model CompanyManagment.App.Contracts.Leave.EditLeave @{ - //int i = 1; +//int i = 1; } @{ - - + } + + + +
+ + + @* *@ + + + + + + + + @@ -122,115 +134,114 @@ \ No newline at end of file + window.location.hash = "##"; + }, 1000); + }); + diff --git a/ServiceHost/Areas/Client/Pages/Company/Employees/Leave.cshtml b/ServiceHost/Areas/Client/Pages/Company/Employees/Leave.cshtml index c1a3b9c2..51d8f4ea 100644 --- a/ServiceHost/Areas/Client/Pages/Company/Employees/Leave.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/Employees/Leave.cshtml @@ -1,27 +1,27 @@ @page @using Version = _0_Framework.Application.Version -@model LeaveModel +@model ServiceHost.Areas.Client.Pages.Company.Employees.LeaveModel @{ - ViewData["title"] = " - مرخصی پرسنل"; - var index = 1; + ViewData["title"] = " - مرخصی پرسنل"; + int index = 1; } @section Styles { - - - - + + + + - - - + + + + + - + + - - - - - - @RenderSection("Script", false) diff --git a/ServiceHost/InsuranceList/546/1403_03/DSKKAR00.dbf b/ServiceHost/InsuranceList/546/1403_03/DSKKAR00.dbf new file mode 100644 index 0000000000000000000000000000000000000000..1b11e6cbc5306d2676914749384815f5cfecc1b0 GIT binary patch literal 1326 zcmb`FKTE?<5WrK54*r>4L~a&@mps!Z;t~_ZQ1eonIMk(!yI;j3)k%a>p@<+(egHp! zgQKe;2#U6}R;<;#r()1NTzbRhxZnMIcgfZ=nT)1sne6-se*TCT6)L_b-7dwA|B4_k zoL~jr?gXl>6u#<|0^-{W?s%n$_?3bed_fb4JPtrJB!&8y%hDq(gufp_JfQBFzo_8r zeiVyPbC-}$%FrK0`JNxS=yBJOr@c>X$OhsB`RGrov?xFJ6*Ay^9T!wYZZ^fcpdqziZAr}b%K0*{ln-;xv4 z|0AZ6r|qx!86akmr`;FFllz%XsUL)*QY_2+xO2#}G)Y3Hz-G)c7Ic%d{-AXVZ`D_L zsy3m!Q-AKX(Kvc&bYN)Gtq$5Z0DV;T&fyRXCnnT$aNnxIJnS`h@jW%@AN2Oo*l+e4 z=zXa^)_aXR*gKXn$K>m_29Jpf|C*{svU<%)MdoyLYqB;9aQZg&4eEAK|x4@SR$-6*L_GJ-}~e zuTF0x{ls+m@5618{ttt#dKK^w0RPIoStw@w&KUn5`WNAqG5%KxUaNq0ApaAX0ApjZ zjO^Rp@d5t=@I~@#m93Vs?{~o8Dh`IW8NWTo|0uzm)z8c*{}JGu3&saqtqgw*_@en~ z_`4bY1n@=nHOKm^uy~8?tB&z{30|pWMg^Y&4%bXE-?!Ijd=8z#9RL@tZ++_{GbZ@5 z6gR`2;OkPnX#@n{l;EvKYscWj6~ z99>08uWd)k{`2tHLC2EtvB`uHw_yGKV_kT%+ayd7EGfA-Lc@Mrr`d;IMq!Nf-#R?E zr<`z137&F?jaWpP=eZR4gOJOyz(Qti%5YXpzjCMj#Ws?zVuE9YG3A(1DVSo?nbPefUpt>tJXqT%wL(X zUQSqoX-?Q;8yHS_k+6bOh8p`y7$DZVhW79_7 zl(1aMyua8+jJr~Bp}@m3E`^}*8s#42OFb-6Kv@BVz3eBp`HG^pM#Ho8tY>3J$1;b{ zpFT`1Z_$L9Upy}t$>219u-qU_0&TEZhlgE2SagFS0hLlwMU=bL!(yg{hZ#Z_sg7;C zrXR!e{~|O@z#mv!*JtU|B(}UmQ)Pbfyj-TI`nV0hJUBYrKRtv5%!HEbAS}4{c@JAk z*r|sth5^O)OCbSuAs&Vh6(ZvDLl;vXB}Bjux8F~X@+Gj;0K)14TwNe-s_mQ*^r`i; zBO-FN@r|cx#UX)fmVF(BeH{;b9l{F58D)~lC4_|l7Iqj3C%*kddtPtCf5;LXrpM?a zO#5*!ne^UleHFd1BzbBl$>Oy9dDVo4Lzj$nvW6@Hwdr96@st!&V7!E|Canco1xV6d zrq;JJ^lx;Qpy5H>0c~Ly{WOTsgPT4htt2E63UemmmXUVFgk_jvx(*NfIw8R|(pq#n zt4l%x${+4kS^Xb{dYd-@ literal 0 HcmV?d00001 diff --git a/ServiceHost/Program.cs b/ServiceHost/Program.cs index 2384850b..61bb6e44 100644 --- a/ServiceHost/Program.cs +++ b/ServiceHost/Program.cs @@ -13,6 +13,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using ServiceHost.Hubs; +using WebEssentials.AspNetCore.Pwa; var builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages() @@ -87,13 +88,13 @@ builder.Services.AddAuthorization(options => }); -//builder.Services.AddAuthorization(options => -//{ -// options.AddPolicy("AdminNewArea", -// builder => builder.RequireClaim("AccountId")); -// options.AddPolicy("AdminNewArea", -// builder => builder.RequireClaim("AdminAreaPermission", new List { "true" })); -//}); +builder.Services.AddAuthorization(options => +{ + options.AddPolicy("AdminNewArea", + builder => builder.RequireClaim("AccountId")); + options.AddPolicy("AdminNewArea", + builder => builder.RequireClaim("AdminAreaPermission", new List { "true" })); +}); //services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme) // .AddCookie(option => @@ -111,15 +112,28 @@ builder.Services.AddRazorPages(options => options.Conventions.AuthorizeAreaFolder("Client", "/", "ClientArea")); builder.Services.AddRazorPages(options => options.Conventions.AuthorizeAreaFolder("Camera", "/", "CameraArea")); -//builder.Services.AddRazorPages(options => -// options.Conventions.AuthorizeAreaFolder("AdminNew", "/", "AdminNewArea")); +builder.Services.AddRazorPages(options => + options.Conventions.AuthorizeAreaFolder("AdminNew", "/", "AdminNewArea")); builder.Services.AddMvc(); builder.Services.AddSignalR(); -//PWA -builder.Services.AddProgressiveWebApp(); + #endregion +#region PWA + +//old +//builder.Services.AddProgressiveWebApp(); + +//new +builder.Services.AddProgressiveWebApp(new PwaOptions +{ + RegisterServiceWorker = true, + RegisterWebmanifest = true, + Strategy = ServiceWorkerStrategy.NetworkFirst, +}); + +#endregion var app = builder.Build(); #region Mahan diff --git a/ServiceHost/appsettings.Development.json b/ServiceHost/appsettings.Development.json index dcb3ac0a..d6187eef 100644 --- a/ServiceHost/appsettings.Development.json +++ b/ServiceHost/appsettings.Development.json @@ -12,10 +12,10 @@ //"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True" //server - //"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170][3019]#@ATt;TrustServerCertificate=true;" + "MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170][3019]#@ATt;TrustServerCertificate=true;" //local - "MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;" + //"MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;" }, "GoogleRecaptchaV3": { "SiteKey": "6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH", diff --git a/ServiceHost/wwwroot/AdminTheme/assets/css/style.css b/ServiceHost/wwwroot/AdminTheme/assets/css/style.css index b88ac317..610031ba 100644 --- a/ServiceHost/wwwroot/AdminTheme/assets/css/style.css +++ b/ServiceHost/wwwroot/AdminTheme/assets/css/style.css @@ -1240,11 +1240,11 @@ lesshat-selector { -lh-property: 0; } left: 0px; right: 0; top: 0px; - z-index: 999; + z-index: 1; background: #ffffff; position: fixed; - -webkit-box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.2); - box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.2); +/* -webkit-box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.2); + box-shadow: 1px 0 3px 0 rgba(0, 0, 0, 0.2);*/ } .topbar .topbar-left { @@ -1252,8 +1252,9 @@ lesshat-selector { -lh-property: 0; } height: 70px; position: relative; z-index: 1; - width: 230px; - background: #950000; + width: 280px; + /*background: #950000;*/ + /*background: #8f8b8b;*/ } .logo h1 { @@ -1265,8 +1266,8 @@ lesshat-selector { -lh-property: 0; } .navbar-default { border: none; margin-bottom: 0px; - background-color: #8f8b8b; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); + background-color: #f5f5f5; + /*box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);*/ border-radius: 0px; } @@ -1279,7 +1280,10 @@ lesshat-selector { -lh-property: 0; } .navbar-default .navbar-nav > .open > a, .navbar-default .navbar-nav > .open > a:focus, .navbar-default .navbar-nav > .open > a:hover { background-color: transparent; } -.nav > li > a i { font-size: 20px; } +.nav > li > a i { + font-size: 20px; + color: #179292; +} .nav > li > a .badge { position: absolute; @@ -1363,19 +1367,23 @@ input.search-bar:-ms-input-placeholder { color: rgba(255, 255, 255, 0.6); } /*********** 5.SIDEBAR ***********/ .side-menu { - width: 230px; + width: 280px; top: 0; bottom: 0; z-index: 2; right: 0; } - .side-menu.left { - background: #d3d3d3; - position: absolute; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); - top: 70px; - } +.side-menu.left { + /*background: #d3d3d3;*/ + background: linear-gradient(180deg, #30C2C2 0%, #077171 100%); + position: absolute; + /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);*/ + /*top: 70px;*/ + border-radius: 35px 0px 0px 35px; + top: 0px; + z-index: 999; +} body.fixed-left .side-menu.left { margin-top: 0px; @@ -1387,7 +1395,7 @@ body.fixed-left .side-menu.left { } .content-page { - margin-right: 230px; + margin-right: 280px; overflow: hidden; position: relative; min-height: 940px; @@ -1402,15 +1410,43 @@ body.fixed-left .side-menu.left { .button-menu-mobile { font-size: 21px; - background: transparent; + /*background: transparent;*/ color: #888; border: none; - line-height: 70px; - color: #fff; - padding: 0px 15px; + /*line-height: 70px;*/ + color: #179292; + /*padding: 0px 15px;*/ + height: 40px; + width: 40px; + background: #fff; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50px; + margin: 12px 12px 0 5px; } -.button-menu-mobile:hover { color: #eee; } +#btn-fullscreen { + font-size: 21px; + /*background: transparent;*/ + color: #888; + border: none; + /*line-height: 70px;*/ + color: #179292; + /*padding: 0px 15px;*/ + height: 40px; + width: 40px; + background: #fff; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50px; + margin: 12px 12px 0 5px; +} + +.button-menu-mobile:hover { + /*color: #eee;*/ +} .sidebar-inner { height: 100%; } @@ -1432,25 +1468,28 @@ body.fixed-left .side-menu.left { #sidebar-menu { width: 100%; - background-color: #d3d3d3; + /*background-color: #d3d3d3;*/ padding-bottom: 50px; } #sidebar-menu > ul > li > a { display: block; - color: #606060; + /*color: #606060;*/ + color: #ffffff; padding: 10px; - background-color: #c9c9c9; - border: 1px solid #b3b3b3; - border-radius: 10px; + /*background-color: #c9c9c9; + border: 1px solid #b3b3b3;*/ + border-radius: 50px; margin: 7px; } #sidebar-menu > ul > li > a > span { vertical-align: middle; } #sidebar-menu > ul > li > a:hover { - background: #f3f3f3; - color: #606060; +/* background: #f3f3f3; + color: #606060;*/ + color: #fff; + background: rgba(255, 255, 255, 0.15); } #sidebar-menu > ul > li > a > i { @@ -1471,41 +1510,167 @@ body.fixed-left .side-menu.left { #sidebar-menu > ul > li > a:hover { text-decoration: none; } - #sidebar-menu > ul > li > a.active, - #sidebar-menu > ul > li > a.active.subdrop { - background: #c9c9c9 !important; - } + #sidebar-menu > ul > li > a.active, + #sidebar-menu > ul > li > a.active.subdrop { + /*background: #c9c9c9 !important;*/ + border: 0.5px solid rgba(255, 255, 255, 0.2); + background: rgba(255, 255, 255, 0.15); + } -.subdrop { background: #f3f3f3; } +.subdrop { + color: #fff; + background: rgba(255, 255, 255, 0.15); + /*background: #f3f3f3;*/ +} #sidebar-menu ul ul { display: none; } #sidebar-menu ul ul li { border-top: 0; } #sidebar-menu ul ul li.active a { - color: #5e5555; + /*color: #5e5555; background: #f5d2d2; - box-shadow: 0px 0px 5px 0px inset #dd8f8f; + box-shadow: 0px 0px 5px 0px inset #dd8f8f;*/ + border: 0.5px solid rgba(255, 255, 255, 0.36); + background: rgba(255, 255, 255, 0.24); } #sidebar-menu ul ul a { - padding: 10px 25px 10px 25px; - display: block; - color: #707070; + padding: 8px 15px; + display: flex; + align-items: center; + /* color: #707070; background-color: #f3f3f3; - border: 1px solid #dddddd; - margin: 0px 7px; - border-radius: 5px; + border: 1px solid #dddddd;*/ + /* margin: 0px 7px; + border-radius: 5px;*/ + margin: 2px 7px; + border-radius: 35px; + color: #fff; + background: rgba(255, 255, 255, 0.15); } - #sidebar-menu ul ul a:hover { - color: #df084d; - } + #sidebar-menu ul ul a:hover { + /*color: #df084d;*/ + color: #fff; + } #sidebar-menu ul ul ul a { padding-left: 80px; } #sidebar-menu ul ul a i { margin-right: 5px; } +/* start logo */ +.logo-gozarshgir { + width: 66px; + margin: 24px auto; + display: block; +} + +#wrapper.enlarged .logo-gozarshgir { + width: 20px; + margin: 0 auto 20px auto; +} + +/* end logo */ + +/* start dropdown user */ +.dropdown { + display: flex; + margin: 12px 0 0 0; +} + +.profile-box { + height: 45px; + /* padding: 10px 2px; */ + border-radius: 25px; + border: 0.5px solid rgba(255, 255, 255, 0.2); + background-color: #ffffff; + display: inline-flex; + align-items: center; +} + +.profile-box img { + width: 30px; + border-radius: 50%; + margin: 3px 0 3px 3px; + height: 30px; + object-fit: cover; + background: #f5f5f5; + display: flex; + align-content: center; + justify-content: center; +} + +.profile-box p { + color: rgba(163, 174, 208, 0.9); + font-size: 12px; + margin: 0 4px 0 18px; + font-weight: 300; +} + +.profile-box:focus { + border: 0.5px solid rgba(255, 255, 255, 0.2); + background-color: #ffffff; + -webkit-border-top-left-radius: 25px; + -webkit-border-top-right-radius: 25px; + -moz-border-radius-topleft: 25px; + -moz-border-radius-topright: 25px; + border-top-left-radius: 25px; + border-top-right-radius: 25px; +} + +.dropdown .dropdown-menu { + width: 100%; + background-color: #ffffff; + -webkit-border-radius: 25px; + -webkit-border-radius: 25px; + -moz-border-radius: 25px; + -moz-border-radius: 25px; + border-radius: 25px; + border-radius: 25px; + border: 0; + margin: 2px 0 0 0 !important; + padding: 5px; + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); +} + +.dropdown .dropdown-menu li { + border: 0.5px solid rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.15); + border-radius: 25px; + cursor: pointer; + transition: all .3s ease; +} + +.dropdown .dropdown-menu li a { + border: 0.5px solid rgba(255, 255, 255, 0.2); + font-size: 12px; + padding: 10px 5px; + color: rgba(132, 139, 159, 0.9); + background-color: transparent; + width: 100%; + display: flex; + align-items: center; + gap: 5px; +} + +.dropdown .dropdown-menu .active { + background-color: rgba(235, 235, 235, 0.7); + border-radius: 25px; +} + +.dropdown .dropdown-menu .workshopActive { + background-color: rgb(224, 253, 253); + border-radius: 25px; + border: 1px solid #26afaf; +} + +.dropdown .dropdown-menu li:hover { + background-color: rgba(235, 235, 235, 0.7); + border-radius: 25px; +} +/* end dropdown user */ + #wrapper.enlarged #sidebar-menu ul ul { box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); } #wrapper.enlarged .left.side-menu #sidebar-menu > ul > li > a { padding-right: 10px; } diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.css b/ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.css new file mode 100644 index 00000000..a1fef12e --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.css @@ -0,0 +1,498 @@ +/*********** 5.SIDEBAR ***********/ + +.side-menu { + width: 280px; + top: 0; + bottom: 0; + z-index: 2; + right: 0; +} + +.side-menu.left { + /*background: #d3d3d3;*/ + background: linear-gradient(180deg, #30C2C2 0%, #077171 100%); + position: absolute; + /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);*/ + /*top: 70px;*/ + border-radius: 35px 0px 0px 35px; + top: 0px; + z-index: 999; +} + +body.fixed-left .side-menu.left { + margin-top: 0px; + position: fixed; + height: 100%; + bottom: 50px; + margin-bottom: -70px; + padding-bottom: 70px; +} + +.content-page { + margin-right: 280px; + overflow: hidden; + position: relative; + min-height: 940px; +} + + .content-page > .content { + margin-top: 70px; + margin-bottom: 60px; + padding: 20px 5px 15px 5px; + position: relative; + } + +.button-menu-mobile { + font-size: 21px; + background: transparent; + color: #888; + border: none; + line-height: 70px; + color: #179292; + padding: 0px 15px; +} + + .button-menu-mobile:hover { + /*color: #eee;*/ + } + +.sidebar-inner { + height: 100%; +} + +#sidebar-menu, +#sidebar-menu ul, +#sidebar-menu li, +#sidebar-menu a { + margin: 0; + padding: 0; + border: 0; + list-style: none; + font-weight: normal; + text-decoration: none; + line-height: 1; + position: relative; +} + +#sidebar-menu a { + line-height: 1.3; +} + +#sidebar-menu { + width: 100%; + /*background-color: #d3d3d3;*/ + padding-bottom: 50px; +} + +#sidebar-menu > ul > li > a { + display: block; + /*color: #606060;*/ + color: #ffffff; + padding: 10px; + /*background-color: #c9c9c9; +border: 1px solid #b3b3b3;*/ + border-radius: 50px; + margin: 7px; + display: flex; + align-content: center; + justify-content: space-between; + cursor: pointer; + font-size: 14px; +} + +#sidebar-menu > ul > li > a > span { + vertical-align: middle; +} + +#sidebar-menu > ul > li > a:hover { + /* background: #f3f3f3; +color: #606060;*/ + color: #fff; + background: rgba(255, 255, 255, 0.15); +} + +#sidebar-menu > ul > li > a > i { + display: inline-block; + font-size: 18px; + line-height: 17px; + margin-right: 3px; + margin-left: 15px; + text-align: center; + vertical-align: middle; + width: 20px; +} + +#sidebar-menu > ul > li > a > i.i-right { + margin: 3px 0 0 0; + float: right; +} + +#sidebar-menu > ul > li > a:hover { + text-decoration: none; +} + +#sidebar-menu > ul > li > a.active, +#sidebar-menu > ul > li > a.active.subdrop { + /*background: #c9c9c9 !important;*/ + border: 0.5px solid rgba(255, 255, 255, 0.2); + background: rgba(255, 255, 255, 0.15); +} + +.subdrop { + color: #fff; + background: rgba(255, 255, 255, 0.15); + /*background: #f3f3f3;*/ +} + +#sidebar-menu ul ul { + display: none; +} + +#sidebar-menu ul ul li { + border-top: 0; +} + +#sidebar-menu ul ul li.active a { + /*color: #5e5555; +background: #f5d2d2; +box-shadow: 0px 0px 5px 0px inset #dd8f8f;*/ + border: 0.5px solid rgba(255, 255, 255, 0.36); + background: rgba(255, 255, 255, 0.24); +} + +#sidebar-menu ul ul a { + padding: 8px 15px; + display: flex; + align-items: center; + /* color: #707070; +background-color: #f3f3f3; +border: 1px solid #dddddd;*/ + /* margin: 0px 7px; +border-radius: 5px;*/ + margin: 2px 7px; + border-radius: 35px; + color: #fff; + background: rgba(255, 255, 255, 0.15); + font-size: 13px; +} + +#sidebar-menu ul ul a:hover { + /*color: #df084d;*/ + color: #fff; +} + +#sidebar-menu ul ul ul a { + padding-left: 80px; +} + +#sidebar-menu ul ul a i { + margin-right: 5px; +} + +/* start logo */ +.logo-gozarshgir { + width: 66px; + margin: 24px auto; + display: block; +} + +#sidebar.enlarged .logo-gozarshgir { + width: 20px; + margin: 0 auto 20px auto; +} + +/* end logo */ + +/* start dropdown user */ +.dropdown { + display: flex; + margin: 12px 0 0 0; +} + +.profile-box { + height: 45px; + /* padding: 10px 2px; */ + border-radius: 25px; + border: 0.5px solid rgba(255, 255, 255, 0.2); + background-color: #ffffff; + display: inline-flex; + align-items: center; +} + + .profile-box img { + width: 30px; + border-radius: 50%; + margin: 3px 0 3px 3px; + height: 30px; + object-fit: cover; + background: #f5f5f5; + display: flex; + align-content: center; + justify-content: center; + } + + .profile-box p { + color: rgba(163, 174, 208, 0.9); + font-size: 12px; + margin: 0 4px 0 18px; + font-weight: 300; + } + + .profile-box:focus { + border: 0.5px solid rgba(255, 255, 255, 0.2); + background-color: #ffffff; + -webkit-border-top-left-radius: 25px; + -webkit-border-top-right-radius: 25px; + -moz-border-radius-topleft: 25px; + -moz-border-radius-topright: 25px; + border-top-left-radius: 25px; + border-top-right-radius: 25px; + } + +.dropdown .dropdown-menu { + width: 100%; + background-color: #ffffff; + -webkit-border-radius: 25px; + -webkit-border-radius: 25px; + -moz-border-radius: 25px; + -moz-border-radius: 25px; + border-radius: 25px; + border-radius: 25px; + border: 0; + margin: 2px 0 0 0 !important; + padding: 5px; + box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); +} + + .dropdown .dropdown-menu li { + border: 0.5px solid rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.15); + border-radius: 25px; + cursor: pointer; + transition: all .3s ease; + } + + .dropdown .dropdown-menu li a { + border: 0.5px solid rgba(255, 255, 255, 0.2); + font-size: 12px; + padding: 10px 5px; + color: rgba(132, 139, 159, 0.9); + background-color: transparent; + width: 100%; + display: flex; + align-items: center; + gap: 5px; + } + + .dropdown .dropdown-menu .active { + background-color: rgba(235, 235, 235, 0.7); + border-radius: 25px; + } + + .dropdown .dropdown-menu .workshopActive { + background-color: rgb(224, 253, 253); + border-radius: 25px; + border: 1px solid #26afaf; + } + + .dropdown .dropdown-menu li:hover { + background-color: rgba(235, 235, 235, 0.7); + border-radius: 25px; + } +/* end dropdown user */ + +#sidebar.enlarged #sidebar-menu ul ul { + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); +} + +#sidebar.enlarged .left.side-menu #sidebar-menu > ul > li > a { + padding-right: 10px; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu > ul > li > a .menuTitle { + text-align: center; + width: 100%; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu > ul > li > a:hover { + background-color: #2fc0c0 !important; + color: #fff; + fill: #fff !important; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu > ul > li > a:hover .menuTitle { + text-align: right; +} + +#sidebar.enlarged .left.side-menu { + width: 80px; + z-index: 5; +} + +#sidebar.enlarged .content-page { + margin-right: 50px; +} +/*#sidebar.enlarged .left.side-menu #sidebar-menu .menuTitle { + +}*/ + +#sidebar.enlarged .topbar .topbar-left { + width: 50px !important; +} + + #sidebar.enlarged .topbar .topbar-left .logo span { + opacity: 0; + display: none; + } + +#sidebar.enlarged .left.side-menu span.pull-right { + display: none !important; +} + +#sidebar.enlarged .topbar .topbar-left .logo i { + margin-right: 0px; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li { + white-space: nowrap; +} + + #sidebar.enlarged .left.side-menu #sidebar-menu ul > li > ul { + display: none; + } + + #sidebar.enlarged .left.side-menu #sidebar-menu ul > li:hover > a { + background: #ffffff; + } + +#sidebar.enlarged #sidebar-menu > ul > li:hover > a.open:after, +#sidebar.enlarged #sidebar-menu > ul > li:hover > a.active:after { + display: inline-block; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul { + position: absolute; + left: 50px; + width: 190px; + display: block; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul ul li:hover > ul { + position: absolute; + left: 190px; + margin-top: -36px; + width: 190px; + display: block; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li:hover > ul a { + background: #fff; + padding-left: 15px; + border: none; + width: 190px; + box-shadow: none; + z-index: 6; + position: relative; + border-left: 3px solid #edf0f0; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul ul li > a span.pull-right { + position: absolute; + right: 20px; + top: 12px; + -ms-transform: rotate(270deg); + -webkit-transform: rotate(270deg); + transform: rotate(270deg); +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li > a span { + display: none; + padding-left: 10px; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li:hover > a { + width: 240px; + position: relative; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li { + position: relative; +} + +#sidebar.enlarged .left.side-menu #sidebar-menu ul > li:hover a span { + display: inline; +} + +/* Leftbar Profile */ + +#sidebar.enlarged .left.side-menu .user-details { + display: none; +} + +#sidebar.enlarged .left.side-menu { + padding-top: 80px; +} + +.user-details { + position: relative; + min-height: 80px; + padding: 20px; + border: 1px solid #b5b2b2; + border-radius: 10px; + margin: 7px; +} + +.user-details img { + position: relative; + z-index: 9999; +} + +.user-details .user-info { + margin-right: 60px; + z-index: 99999; + position: relative; + color: #444; +} + +.user-details .user-info a.dropdown-toggle { + font-family: IranSans; + font-weight: 600; + color: #837878; + font-size: 16px; + padding-top: 5px; + display: block; +} + +#sidebar.right-bar-enabled .right-bar { + right: 0; +} + +#sidebar.right-bar-enabled .left-layout { + left: 0; +} + +.side-bar.right-bar { + float: right !important; + right: -266px; + top: 70px; +} + +.side-bar { + position: fixed; + height: 100%; + width: 240px; + background-color: #ffffff; + display: block; + float: left; + box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.1); + -webkit-transition: all 200ms ease-out; + -moz-transition: all 200ms ease-out; + transition: all 200ms ease-out; + overflow-y: auto; +} + +@media (max-width: 768px) { + .side-menu.left { + display: none; + } +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.js b/ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.js new file mode 100644 index 00000000..32ad2e2d --- /dev/null +++ b/ServiceHost/wwwroot/AssetsAdminNew/Sidbar_AdminNew/sidebar_admin.js @@ -0,0 +1,292 @@ +/** +* Theme: Montran Admin Template +* Author: Coderthemes +* Module/App: Main Js +*/ + +!function($) { + "use strict"; + + var Sidemenu = function() { + this.$body = $("body"), + this.$openLeftBtn = $(".open-left"), + this.$menuItem = $("#sidebar-menu a") + }; + Sidemenu.prototype.openLeftBar = function() { + $("#wrapper").toggleClass("enlarged"); + $("#wrapper").addClass("forced"); + + if ($("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left")) { + $("body").removeClass("fixed-left").addClass("fixed-left-void"); + } else if (!$("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left-void")) { + $("body").removeClass("fixed-left-void").addClass("fixed-left"); + } + + if ($("#wrapper").hasClass("enlarged")) { + $(".left ul").removeAttr("style"); + } else { + $(".subdrop").siblings("ul:first").show(); + } + + toggle_slimscroll(".slimscrollleft"); + $("body").trigger("resize"); + }, + //menu item click + Sidemenu.prototype.menuItemClick = function(e) { + if (!$("#wrapper").hasClass("enlarged")) { + if ($(this).parent().hasClass("has_sub")) { + e.preventDefault(); + } + if (!$(this).hasClass("subdrop")) { + // hide any open menus and remove all other classes + $("ul", $(this).parents("ul:first")).slideUp(350); + $("a", $(this).parents("ul:first")).removeClass("subdrop"); + $("#sidebar-menu .pull-right i").removeClass("md-remove").addClass("md-add"); + + // open our new menu and add the open class + $(this).next("ul").slideDown(350); + $(this).addClass("subdrop"); + $(".pull-right i", $(this).parents(".has_sub:last")).removeClass("md-add") + .addClass("md-remove"); + $(".pull-right i", $(this).siblings("ul")).removeClass("md-remove").addClass("md-add"); + } else if ($(this).hasClass("subdrop")) { + $(this).removeClass("subdrop"); + $(this).next("ul").slideUp(350); + $(".pull-right i", $(this).parent()).removeClass("md-remove").addClass("md-add"); + } + } + }, + + //init sidemenu + Sidemenu.prototype.init = function() { + var $this = this; + //bind on click + $(".open-left").click(function(e) { + e.stopPropagation(); + $this.openLeftBar(); + }); + + // // LEFT SIDE MAIN NAVIGATION + $this.$menuItem.on('click', $this.menuItemClick); + + // // NAVIGATION HIGHLIGHT & OPEN PARENT + $("#sidebar-menu ul li.has_sub a.active").parents("li:last").children("a:first").addClass("active") + .trigger("click"); + }, + + //init Sidemenu + $.Sidemenu = new Sidemenu, $.Sidemenu.Constructor = Sidemenu + + }(window.jQuery), + function($) { + "use strict"; + + var FullScreen = function() { + this.$body = $("body"), + this.$fullscreenBtn = $("#btn-fullscreen") + }; + + //turn on full screen + // Thanks to http://davidwalsh.name/fullscreen + FullScreen.prototype.launchFullscreen = function(element) { + if (element.requestFullscreen) { + element.requestFullscreen(); + } else if (element.mozRequestFullScreen) { + element.mozRequestFullScreen(); + } else if (element.webkitRequestFullscreen) { + element.webkitRequestFullscreen(); + } else if (element.msRequestFullscreen) { + element.msRequestFullscreen(); + } + }, + FullScreen.prototype.exitFullscreen = function() { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.webkitExitFullscreen) { + document.webkitExitFullscreen(); + } + }, + //toggle screen + FullScreen.prototype.toggle_fullscreen = function() { + var $this = this; + var fullscreenEnabled = document.fullscreenEnabled || + document.mozFullScreenEnabled || + document.webkitFullscreenEnabled; + if (fullscreenEnabled) { + if (!document.fullscreenElement && + !document.mozFullScreenElement && + !document.webkitFullscreenElement && + !document.msFullscreenElement) { + $this.launchFullscreen(document.documentElement); + } else { + $this.exitFullscreen(); + } + } + }, + //init sidemenu + FullScreen.prototype.init = function() { + var $this = this; + //bind + $this.$fullscreenBtn.on('click', + function() { + $this.toggle_fullscreen(); + }); + }, + //init FullScreen + $.FullScreen = new FullScreen, $.FullScreen.Constructor = FullScreen + + }(window.jQuery), + + //portlets + function($) { + "use strict"; + + /** + Portlet Widget + */ + var Portlet = function() { + this.$body = $("body"), + this.$portletIdentifier = ".portlet", + this.$portletCloser = '.portlet a[data-toggle="remove"]', + this.$portletRefresher = '.portlet a[data-toggle="reload"]' + }; + + //on init + Portlet.prototype.init = function() { + // Panel closest + var $this = this; + $(document).on("click", + this.$portletCloser, + function(ev) { + ev.preventDefault(); + var $portlet = $(this).closest($this.$portletIdentifier); + var $portlet_parent = $portlet.parent(); + $portlet.remove(); + if ($portlet_parent.children().length == 0) { + $portlet_parent.remove(); + } + }); + + // Panel Reload + $(document).on("click", + this.$portletRefresher, + function(ev) { + ev.preventDefault(); + var $portlet = $(this).closest($this.$portletIdentifier); + // This is just a simulation, nothing is going to be reloaded + $portlet.append('
'); + var $pd = $portlet.find('.panel-disabled'); + setTimeout(function() { + $pd.fadeOut('fast', + function() { + $pd.remove(); + }); + }, + 500 + 300 * (Math.random() * 5)); + }); + }, + // + $.Portlet = new Portlet, $.Portlet.Constructor = Portlet; + + }(window.jQuery); + + + +/* ------------ some utility functions ----------------------- */ +//this full screen +var toggle_fullscreen = function () { + +} + +function executeFunctionByName(functionName, context /*, args */) { + var args = [].slice.call(arguments).splice(2); + var namespaces = functionName.split("."); + var func = namespaces.pop(); + for (var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } + return context[func].apply(this, args); +} +var w, h, dw, dh; +var changeptype = function () { + w = $(window).width(); + h = $(window).height(); + dw = $(document).width(); + dh = $(document).height(); + + if (jQuery.browser.mobile === true) { + $("body").addClass("mobile").removeClass("fixed-left"); + } + + if (!$("#wrapper").hasClass("forced")) { + if (w > 990) { + $("body").removeClass("smallscreen").addClass("widescreen"); + $("#wrapper").removeClass("enlarged"); + } else { + $("body").removeClass("widescreen").addClass("smallscreen"); + $("#wrapper").addClass("enlarged"); + $(".left ul").removeAttr("style"); + } + if ($("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left")) { + $("body").removeClass("fixed-left").addClass("fixed-left-void"); + } else if (!$("#wrapper").hasClass("enlarged") && $("body").hasClass("fixed-left-void")) { + $("body").removeClass("fixed-left-void").addClass("fixed-left"); + } + + } + toggle_slimscroll(".slimscrollleft"); +} + + +var debounce = function (func, wait, immediate) { + var timeout, result; + return function () { + var context = this, args = arguments; + var later = function () { + timeout = null; + if (!immediate) result = func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) result = func.apply(context, args); + return result; + }; +} + +function resizeitems() { + if ($.isArray(resizefunc)) { + for (i = 0; i < resizefunc.length; i++) { + window[resizefunc[i]](); + } + } +} + +function initscrolls() { + if (jQuery.browser.mobile !== true) { + //SLIM SCROLL + $('.slimscroller').slimscroll({ + height: 'auto', + size: "5px" + }); + + $('.slimscrollleft').slimScroll({ + height: 'auto', + position: 'right', + size: "5px", + color: '#7A868F', + wheelStep: 5 + }); + } +} +function toggle_slimscroll(item) { + if ($("#wrapper").hasClass("enlarged")) { + $(item).css("overflow", "inherit").parent().css("overflow", "inherit"); + $(item).siblings(".slimScrollBar").css("visibility", "hidden"); + } else { + $(item).css("overflow", "hidden").parent().css("overflow", "hidden"); + $(item).siblings(".slimScrollBar").css("visibility", "visible"); + } +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsClient/css/style.css b/ServiceHost/wwwroot/AssetsClient/css/style.css index ffe8d143..2dcee383 100644 --- a/ServiceHost/wwwroot/AssetsClient/css/style.css +++ b/ServiceHost/wwwroot/AssetsClient/css/style.css @@ -515,35 +515,35 @@ ul { 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: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.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 { - color: rgba(245, 245, 245, 0.8); - 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 { + color: rgba(245, 245, 245, 0.8); + 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 { + transition: ease .4s; +} - .sidebar-navigation > .sidebar-menu > ul li a svg { - margin: auto 2px; - } +.sidebar-navigation > .sidebar-menu > ul li a svg { + margin: auto 2px; +} diff --git a/ServiceHost/wwwroot/AssetsClient/css/ticket-create.css b/ServiceHost/wwwroot/AssetsClient/css/ticket-create.css new file mode 100644 index 00000000..3a5ab3ae --- /dev/null +++ b/ServiceHost/wwwroot/AssetsClient/css/ticket-create.css @@ -0,0 +1,205 @@ +.ticketModal .modal-xl-ticketModal{ + max-width: 900px; +} + +#Ticket_step1 { + position: absolute; + top: 0; + right: 0; + height: 100%; + backdrop-filter: blur(7px); + z-index: 5; +} + +.btn-ticket-container { + display: flex; +} + +.btn1-ticket, +.btn2-ticket { + font-size: 13px; + font-weight: 500; + color: #ffffff; + background-color: #23A8A8; + text-align: center; + padding: 8px 16px; + border-radius: 4px; + margin: auto 6px; + transition: all .3s ease-in-out; +} + + +.btn1-ticket:hover, +.btn2-ticket:hover { + background-color: #1c7474; +} + + + +.textTitle1 { + color: #313131; + font-size: 14px; + font-weight: 600; +} + +.textTitle2 { + color: #313131; + font-size: 13px; + font-weight: 500; +} + +.btn-ticket { + position: absolute; + bottom: 0; + left: 0; + width: 38px; + height: 38px; + border-radius: 7px; + background-color: #ffffff; + box-shadow: 0px 4px 16px #494949; +} + +.screenshot-border { + border: 2px dashed #C4C4C4; + border-radius: 5px; + height: 97%; +} + + +.form-control, +.form-select { + color: #797979; + border: 1px solid #DADADA; + border-radius: 7px; + background-color: #F6F6F6; + font-size: 13px; + font-weight: 500; +} + +.ticket-descr { + color: #797979; + width: 100%; + border: 1px solid #DADADA; + border-radius: 7px; + background-color: #F6F6F6; + font-size: 13px; + font-weight: 500; +} + + +.upload-file { + width: 100%; + border-radius: 8px; + background: linear-gradient(94deg, #2EBEBE 1.59%, #1E9D9D 47.86%, #0B7878 101.16%); + color: #ffffff; + font-size: 12px; + font-weight: 500; + padding: 7px 10px; +} + +.upload-file.empty-file +{ + background: white; + outline: 1px solid #C4C4C4; + color: #7A7474; +} + +.upload-box-container { + justify-content: start; +} + +.upload-box { + position: relative; + width: 40px; + height: 40px; + border: 2px dashed #C4C4C4; + border-radius: 7px; +} + +.upload-box svg { + position: absolute; + top: -5px; + right: -5px; +} + +.upload-box-voice { + position: relative; + width: 100%; + height: 40px; + border: 2px dashed #C4C4C4; + border-radius: 7px; +} + + +.upload-voice { + width: 100%; + margin: 1%; + border: 2px dashed #BFBFBF !important; + border-radius: 10px; + min-height: auto !important; + padding: 18px 10px !important; +} + +.btn-voice { + width: 100%; + background-color: transparent; + border-radius: 10px; +} + +.btn-cancel2 { + background-color: #1F2937; + color: #ffffff; + padding: 7px 15px; + border-radius: 5px; + width: 100%; +} + +.btn-cancel2:hover { + background-color: #121820; +} + + +.btn-ticket-save { + background-color: #84CC16; + color: #ffffff; + padding: 7px 15px; + border-radius: 5px; + width: 100%; +} + +.btn-ticket-save:hover { + background-color: #629b0c; +} + + +@media (max-width:992px) { + .screenshot-border { + height: 200px; + order: 3; + } + + .upload-box-container { + justify-content: center; + margin: 5px 0; + } +} + +@media (max-width:768px) { + .btn1-ticket, + .btn2-ticket { + width: 100%; + margin: 5px auto; + } + + .btn-ticket-container { + display: flex; + flex-direction: column; + } + +} +@media (max-width:534px) { + .btn-ticket-container { + width: 100%; + } + +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsClient/css/ticket-list.css b/ServiceHost/wwwroot/AssetsClient/css/ticket-list.css new file mode 100644 index 00000000..1e9eac17 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsClient/css/ticket-list.css @@ -0,0 +1,216 @@ +.table-ticket .width1, +.table-ticket .ticket-list .width1 { + width: 5% !important; +} + +.table-ticket .width2, +.table-ticket .ticket-list .width2 { + width: 10% !important; +} + +.table-ticket .width3, +.table-ticket .ticket-list .width3 { + width: 20% !important; +} + +.table-ticket .width4, +.table-ticket .ticket-list .width4 { + width: 10% !important; + text-align: center !important; +} + +.table-ticket .width5, +.table-ticket .ticket-list .width5 { + width: 25% !important; + text-align: center !important; +} + +.table-ticket .ticket-list .width4 .Rtable-cell--content, +.table-ticket .ticket-list .width5 .Rtable-cell--content { + text-align: center; + text-align: -webkit-center; +} + +.table-ticket .width6, +.table-ticket .ticket-list .width6 { + width: 15% !important; +} + +.badget-inprogress { + color: #ffffff; + background-color: #EAB308; + width: 50%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; +} + +.badget-answer { + color: #ffffff; + background-color: #84CC16; + width: 50%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; +} + +.badget-closed { + color: #ffffff; + background-color: #454D5C; + width: 50%; + text-align: center; + padding: 3px 6px; + border-radius: 30px; +} + + +.btn-ticket-detail { + background: rgba(93, 209, 52, 0.3); + border: 0.5px solid #FFFFFF; + border-radius: 6px; + position: relative; + overflow: hidden; + color: #ffffff; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-edit { + background: rgba(52, 209, 209, 0.3); + border-radius: 6px; + position: relative; + overflow: hidden; + color: #009EE2; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-delete { + background: rgba(209, 50, 50, 0.15); + border-radius: 6px; + position: relative; + overflow: hidden; + color: #BF3737; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-detail:hover { + background: rgba(93, 209, 52, 0.4); +} + +.btn-ticket-edit:hover { + background: rgba(52, 209, 209, 0.5); +} + +.btn-ticket-delete:hover { + background: rgba(209, 50, 50, 0.3); +} + + +.btn-ticket-more { + background: #C7F8F8; + border: 1px solid #0B5959; + border-radius: 7px; + position: relative; + overflow: hidden; + color: #0B5959; + text-align: right; + font-size: 11px; + padding: 3px; + font-style: normal; + font-weight: 400; + line-height: normal; + white-space: nowrap; +} + +.btn-ticket-more:hover { + background: #ACD2D2; +} + +.table-ticket .Rtable .Rtable-row .Rtable-cell .Rtable-cell--content > span { + border-radius: 5px; + background: rgba(87, 227, 227, 0.25); + width: 60px; + height: 32px; + display: inline-block; + padding: 0 10px; + font-weight: 600; + } + +.operations-btns { + border: 0; +} + +.operations-btns .span1 { + color: #0B5959; + font-size: 14px; + font-weight: 500; +} +.operations-btns .span2 { + color: #0B5959; + font-size: 13px; + font-weight: 500; +} + +@media (min-width: 1380px) { + .badget-inprogress, + .badget-answer, + .badget-closed { + width: 130px; + } +} + +@media (max-width: 767px) { + .Rtable--collapse .Rtable-row { + outline: 0; + border: 1px solid #ECFFFF; + padding: 0; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width3 .Rtable-cell--content { + justify-content: right; + display: flex; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width6 { + justify-content: end; + } + + .Rtable--collapse .Rtable-row .Rtable-cell.width6 .Rtable-cell--content { + justify-content: end; + display: flex; + } + + .Rtable--collapse .Rtable-row .Rtable-cell { + border-bottom: 0; + } + + .badget-inprogress, + .badget-answer, + .badget-closed { + border-radius: 0; + } + + .btn-ticket-detail { + border: 1px solid #248826; + border-radius: 8px; + color: #248826; + background-color: #B7EABA; + } +} \ No newline at end of file diff --git a/ServiceHost/wwwroot/AssetsClient/css/ticket-message.css b/ServiceHost/wwwroot/AssetsClient/css/ticket-message.css new file mode 100644 index 00000000..108782e6 --- /dev/null +++ b/ServiceHost/wwwroot/AssetsClient/css/ticket-message.css @@ -0,0 +1,159 @@ +.messageModal .modal-xl-messageModal{ + max-width: 560px; +} + +.ticket-message-container { + background-color: #F1F1F1; + height: 350px; + border-radius: 12px; + padding: 5px; + position: relative; + overflow-y: scroll; +} + +.ticket-message-sender { + background-color: #2CD0D0; + border: 1px solid #1fd5d5; + border-radius: 9px; + padding: 5px; + color: #ffffff; + font-size: 12px; + text-align: justify; + width: 70%; + margin-left: auto; + margin-bottom: 18px; +} +.ticket-message-sender .header-message{ + display: flex; + justify-content: space-between; + align-items: center; + font-size: 11px; +} +.ticket-message-sender .footer-message-attachment{ + display: flex; + justify-content: end; + align-items: center; + font-size: 11px; +} +.ticket-message-sender .footer-message-attachment .file-attach { + width: 24px; + height: 24px; + border-radius: 3px; + background-color: #DADADA; + margin: auto 3px; +} + + +.ticket-message-reciever { + background-color: #ffffff; + border: 1px solid #2FD0D0; + border-radius: 9px; + padding: 5px; + color: #0B5959; + font-size: 12px; + text-align: justify; + width: 70%; + margin-right: auto; + margin-bottom: 18px; +} +.ticket-message-reciever .header-message{ + display: flex; + justify-content: space-between; + align-items: center; + font-size: 11px; +} +.ticket-message-reciever .footer-message-attachment{ + display: flex; + justify-content: end; + align-items: center; + font-size: 11px; +} + + +.footer-message-container { + display: flex; + justify-content: space-between; + align-items: center; + position: sticky; + background-color: #ffffff; + bottom: 5px; + width: 100%; +} + + +.footer-message-container .message-input-div { + position: relative; + border: 1px solid #DADADA; + border-radius: 6px; + width: 100%; +} + +.footer-message-container .message-input-div .form-control { + background-color: #ffffff; + color: #797979; + font-size: 12px; + padding: 6px; + border: 0; +} + +.footer-message-container .message-input-div .btn-send { + color: #ffffff; + font-size: 12px; + background-color: #84CC16; + padding: 4px 6px; + border-radius: 4px; + position: absolute; + left: 3px; + top: 50%; + transform: translateY(-50%); +} + +.footer-message-container .message-input-div .btn-send:hover { + background-color: #629b0c; +} + +.upload-file, +.upload-file-voice { + padding: 5px; + width: auto; + font-size: 12px; + white-space: nowrap; + margin: auto 3px; +} + + +@media (max-width: 768px) { + .messageModal .modal-xl-messageModal{ + height: 90vh; + } + + .ticket-message-sender, + .ticket-message-reciever { + width: 90%; + font-size: 10px; + } + + .ticket-message-sender .header-message, + .ticket-message-reciever .header-message { + font-size: 9px; + } + + .footer-message-container { + display: flex; + flex-direction: column; + } + + .footer-message-container .message-input-div .form-control { + font-size: 11px; + margin: 2px 0; + } + .upload-file, + .upload-file-voice { + font-size: 10px; + width: 100%; + margin: 4px auto; + } + + + +} diff --git a/ServiceHost/wwwroot/AssetsClient/js/site.js b/ServiceHost/wwwroot/AssetsClient/js/site.js index 31e3a784..65d2cafd 100644 --- a/ServiceHost/wwwroot/AssetsClient/js/site.js +++ b/ServiceHost/wwwroot/AssetsClient/js/site.js @@ -135,12 +135,13 @@ function CallBackHandler(data, action, form) { items2.push({ id: key, vall: val }) }); - - $('.alert-msg').show(); - $('.alert-msg p').text(data.message); + + $('.alert-success-msg').show(); + $('.alert-success-msg p').text(data.message); setTimeout(function () { - $('.alert-msg').hide(); - $('.alert-msg p').text(''); + $('.alert-success-msg').hide(); + $('.alert-success-msg p').text(''); + window.location.reload(); }, 1500); setTimeout(function () { diff --git a/ServiceHost/wwwroot/manifest.json b/ServiceHost/wwwroot/manifest.json index ea1a8116..09ff5f69 100644 --- a/ServiceHost/wwwroot/manifest.json +++ b/ServiceHost/wwwroot/manifest.json @@ -1,17 +1,19 @@ { - "name": "Gozareshgir", - "short_name": "Gozareshgir", - "description": "Intelligent human resource management system.", - "icons": [ - { - "src": "/AssetsClient/images/pwa/icon192x192.png", - "sizes": "192x192" - }, - { - "src": "/AssetsClient/images/pwa/icon512x512.png", - "sizes": "512x512" - } - ], - "display": "standalone", - "start_url": "/" + "name": "Gozareshgir", + "short_name": "Gozareshgir", + "description": "Intelligent human resource management system.", + "icons": [ + { + "src": "/AssetsClient/images/pwa/icon192x192.png", + "sizes": "192x192" + }, + { + "src": "/AssetsClient/images/pwa/icon512x512.png", + "sizes": "512x512" + } + ], + "start_url": "/", + "display": "standalone", + "theme_color": "white", + "background_color": "white" } \ No newline at end of file diff --git a/ServiceHost/wwwroot/service-worker.js b/ServiceHost/wwwroot/service-worker.js new file mode 100644 index 00000000..0bc4169f --- /dev/null +++ b/ServiceHost/wwwroot/service-worker.js @@ -0,0 +1,19 @@ +self.addEventListener('install', event => { + console.log('Service Worker installing.'); + // Add a call to skipWaiting here if you want the SW to immediately activate + // self.skipWaiting(); +}); + +self.addEventListener('activate', event => { + console.log('Service Worker activating.'); + // Take control of all clients immediately + // event.waitUntil(clients.claim()); +}); + +self.addEventListener('fetch', event => { + event.respondWith( + fetch(event.request).catch(() => { + return new Response('Offline'); + }) + ); +}); \ No newline at end of file