Compare commits
55 Commits
Feature/Bg
...
83b045c2b1
| Author | SHA1 | Date | |
|---|---|---|---|
| 83b045c2b1 | |||
|
|
9ca041ac18 | ||
|
|
031fb05f8c | ||
|
|
4aed0ddd68 | ||
|
|
9b455d4a2e | ||
|
|
0c0e955800 | ||
|
|
5f7f63689c | ||
|
|
7db754af56 | ||
|
|
87afbbe44c | ||
| 5fa49a4988 | |||
|
|
5576ee5c24 | ||
|
|
42ea521e0b | ||
|
|
c608e22062 | ||
|
|
bb80da6e3b | ||
|
|
4c734e0513 | ||
|
|
cc3812ebee | ||
|
|
99e807fa23 | ||
|
|
17e390d840 | ||
|
|
f4a16b8c69 | ||
|
|
2ce17dcac9 | ||
|
|
233c1a3aa9 | ||
|
|
c2fa992369 | ||
|
|
922ab6f32b | ||
|
|
0eee2a53c3 | ||
|
|
37cd07c2b8 | ||
|
|
6201492879 | ||
|
|
b0f5ec6bbd | ||
|
|
9ef48b982d | ||
|
|
2a306dedac | ||
|
|
489528d076 | ||
|
|
400790a53b | ||
|
|
6a2ff178d3 | ||
|
|
5f64b945d1 | ||
|
|
280a475455 | ||
|
|
a7b91fac18 | ||
|
|
fcea7eed21 | ||
|
|
0a293dfa8c | ||
|
|
5825c7b8e2 | ||
| ebdf26d93c | |||
|
|
67ec735778 | ||
|
|
3a6f87eaca | ||
|
|
1ebbd2d7a9 | ||
|
|
a40a9643f4 | ||
|
|
55c139578d | ||
|
|
e9588125c0 | ||
|
|
ec277629fb | ||
|
|
bf9c317565 | ||
|
|
22bd435627 | ||
|
|
423d6ada9b | ||
|
|
faeb297f5c | ||
|
|
8bdfd44bba | ||
|
|
104534ed96 | ||
|
|
c00a9c0864 | ||
|
|
cdb29a80e1 | ||
|
|
c3457881b0 |
8
0_Framework/Application/Enums/ActivationStatus.cs
Normal file
8
0_Framework/Application/Enums/ActivationStatus.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace _0_Framework.Application.Enums;
|
||||
|
||||
public enum ActivationStatus
|
||||
{
|
||||
None = 0,
|
||||
Active = 1,
|
||||
DeActive = 2
|
||||
}
|
||||
8
0_Framework/Application/Enums/LegalType.cs
Normal file
8
0_Framework/Application/Enums/LegalType.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace _0_Framework.Application.Enums;
|
||||
|
||||
public enum LegalType
|
||||
{
|
||||
None = 0,
|
||||
Real = 1,
|
||||
Legal = 2
|
||||
}
|
||||
7
0_Framework/Application/SelectListViewModel.cs
Normal file
7
0_Framework/Application/SelectListViewModel.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace _0_Framework.Application;
|
||||
|
||||
public class SelectListViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Text { get; set; }
|
||||
}
|
||||
@@ -41,6 +41,23 @@ public static class Tools
|
||||
return Regex.IsMatch(mobileNo, "^((09))(\\d{9})$");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع و تعداد ماه را میگیرد و تاریخ پایان قراردا را بر میگرداند
|
||||
/// </summary>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="monthPlus"></param>
|
||||
/// <returns></returns>
|
||||
public static (DateTime endDateGr, string endDateFa) FindEndOfContract(string startDate, string monthPlus)
|
||||
{
|
||||
|
||||
int startYear = Convert.ToInt32(startDate.Substring(0, 4));
|
||||
int startMonth = Convert.ToInt32(startDate.Substring(5, 2));
|
||||
int startDay = Convert.ToInt32(startDate.Substring(8, 2));
|
||||
var start = new PersianDateTime(startYear, startMonth, startDay);
|
||||
var end = (start.AddMonths(Convert.ToInt32(monthPlus))).AddDays(-1);
|
||||
return ($"{end}".ToGeorgianDateTime(), $"{end}");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت روزهای کارکرد پرسنل در لیست بیمه ماه مشخص شده
|
||||
|
||||
26
Company.Domain/ContactUsAgg/ContactUs.cs
Normal file
26
Company.Domain/ContactUsAgg/ContactUs.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ContactUsAgg;
|
||||
|
||||
public class ContactUs:EntityBase
|
||||
{
|
||||
public ContactUs(string firstName, string lastName, string email, string phoneNumber, string title, string message)
|
||||
{
|
||||
FirstName = firstName.Trim();
|
||||
LastName = lastName.Trim();
|
||||
Email = email;
|
||||
PhoneNumber = phoneNumber;
|
||||
Title = title;
|
||||
Message = message;
|
||||
FullName = FirstName + " " + LastName;
|
||||
}
|
||||
|
||||
public string FirstName { get; private set; }
|
||||
public string LastName { get; private set; }
|
||||
public string Email { get; private set; }
|
||||
public string PhoneNumber { get; private set; }
|
||||
public string Title { get; private set; }
|
||||
public string Message { get; private set; }
|
||||
public string FullName { get; private set; }
|
||||
|
||||
}
|
||||
8
Company.Domain/ContactUsAgg/IContactUsRepository.cs
Normal file
8
Company.Domain/ContactUsAgg/IContactUsRepository.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.ContactUsAgg;
|
||||
|
||||
public interface IContactUsRepository : IRepository<long, ContactUs>
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Company.Domain.ContarctingPartyAgg;
|
||||
|
||||
@@ -42,6 +43,34 @@ public interface IPersonalContractingPartyRepository :IRepository<long, Personal
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرف حساب ها
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ICollection<ContractingPartyGetListViewModel>> GetList(ContractingPartyGetListSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرف حساب برای سلکت لیست سرچ
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<ContractingPartySelectListViewModel>> GetSelectList();
|
||||
|
||||
/// <summary>
|
||||
/// لیستی از شماره ملی یا شناسه ملی بر اساس حقیقی یا حقوقی بودن
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<GetContractingPartyNationalCodeOrNationalIdViewModel>> GetNationalCodeOrNationalId();
|
||||
|
||||
/// <summary>
|
||||
/// غیرفعال کردن طرف حساب و زیرمجموعه های آن
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult<string>> DeactivateWithSubordinates(long id);
|
||||
|
||||
void Remove(PersonalContractingParty entity);
|
||||
Task<GetRealContractingPartyDetailsViewModel> GetRealDetails(long id);
|
||||
Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id);
|
||||
|
||||
}
|
||||
@@ -213,6 +213,7 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
earlyExit.EarlyExitTimeFines.Select(x => new EarlyExitTimeFine(x.Minute, x.FineMoney))
|
||||
.ToList(), earlyExit.Value);
|
||||
}
|
||||
|
||||
public void UpdateIsShiftChange()
|
||||
{
|
||||
var groupSetting = CustomizeWorkshopGroupSettings;
|
||||
@@ -269,4 +270,10 @@ public class CustomizeWorkshopEmployeeSettings : BaseCustomizeEntity
|
||||
|
||||
IsShiftChanged = isShiftChange;
|
||||
}
|
||||
|
||||
|
||||
public void SetSalary(double salary)
|
||||
{
|
||||
Salary = salary;
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,12 @@ public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||
List<LateToWorkEarlyExistSpannig> LateToWorkEarlyExit(List<GroupedRollCalls> groupedRollCall,
|
||||
ICollection<CustomizeWorkshopEmployeeSettingsShift> shiftSettings, List<LeaveViewModel> leavList);
|
||||
|
||||
List<LoanInstallmentViewModel> LoanInstallmentForCheckout(long employeeId, long workshopId, DateTime contractStart,
|
||||
DateTime contractEnd);
|
||||
|
||||
List<SalaryAidViewModel> SalaryAidsForCheckout(long employeeId, long workshopId, DateTime checkoutStart,
|
||||
DateTime checkoutEnd);
|
||||
|
||||
/// <summary>
|
||||
/// گزارش نوبت کاری حضور غیاب
|
||||
/// </summary>
|
||||
@@ -47,12 +53,6 @@ public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||
/// <param name="contractEnd"></param>
|
||||
/// <param name="shiftwork"></param>
|
||||
/// <returns></returns>
|
||||
List<LoanInstallmentViewModel> LoanInstallmentForCheckout(long employeeId, long workshopId, DateTime contractStart,
|
||||
DateTime contractEnd);
|
||||
|
||||
List<SalaryAidViewModel> SalaryAidsForCheckout(long employeeId, long workshopId, DateTime checkoutStart,
|
||||
DateTime checkoutEnd);
|
||||
|
||||
Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart,
|
||||
DateTime contractEnd, string shiftwork, bool hasRollCall, CreateWorkingHoursTemp command,bool holidayWorking);
|
||||
}
|
||||
@@ -23,7 +23,6 @@ public class SalaryAid : EntityBase
|
||||
CalculationMonth = calculationMonth;
|
||||
CalculationYear = calculationYear;
|
||||
}
|
||||
|
||||
public long EmployeeId { get; private set; }
|
||||
public long WorkshopId { get; private set; }
|
||||
public double Amount { get; private set; }
|
||||
|
||||
@@ -14,5 +14,7 @@ public interface IWorkshopTempRepository : IRepository<long, WorkshopTemp>
|
||||
/// <returns></returns>
|
||||
Task<List<WorkshopTempViewModel>> GetWorkshopTemp(long contractingPartyTemp);
|
||||
|
||||
System.Threading.Tasks.Task RemoveWorkshopTemps(List<long> workshopTempIds);
|
||||
|
||||
|
||||
}
|
||||
@@ -34,12 +34,14 @@ public class InstitutionContractTemp : EntityBase
|
||||
/// بصورت یکجا
|
||||
/// -
|
||||
/// بصئورت ماهیانه
|
||||
/// OneTime
|
||||
/// </summary>
|
||||
public string PaymentModel { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// مدت قرارداد
|
||||
/// چند ماهه؟
|
||||
/// "12"
|
||||
/// </summary>
|
||||
public string PeriodModel { get; private set; }
|
||||
|
||||
|
||||
@@ -56,6 +56,16 @@ public interface IEmployerRepository : IRepository<long, Employer>
|
||||
|
||||
#endregion
|
||||
|
||||
#region Api
|
||||
Task<List<GetEmployerListViewModel>> GetEmployerList(GetEmployerSearchModel searchModel);
|
||||
|
||||
Task<GetLegalEmployerDetailViewModel> GetLegalEmployerDetail(long id);
|
||||
Task<GetRealEmployerDetailViewModel> GetRealEmployerDetail(long id);
|
||||
//Task<List<EmployerSelectListViewModel>> GetSelectList(string search);
|
||||
Task<OperationResult<string>> DeactivateWithSubordinates(long id);
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ContactUs;
|
||||
|
||||
public interface IContactUsApplication
|
||||
{
|
||||
OperationResult Create(CreateContactUs command);
|
||||
}
|
||||
|
||||
public class CreateContactUs
|
||||
{
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
@@ -8,6 +8,7 @@ public class CustomizeWorkshopGroupSettingsViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public double Salary { get; set; }
|
||||
public string SalaryStr { get; set; }
|
||||
public string GroupName { get; set; }
|
||||
public bool MainGroup { get; set; }
|
||||
public List<CustomizeWorkshopShiftViewModel> RollCallWorkshopShifts { get; set; }
|
||||
@@ -18,4 +19,5 @@ public class CustomizeWorkshopGroupSettingsViewModel
|
||||
public BreakTime BreakTime { get; set; }
|
||||
public FridayWork FridayWork { get; set; }
|
||||
public HolidayWork HolidayWork { get; set; }
|
||||
public int LeavePermitted { get; set; }
|
||||
}
|
||||
@@ -28,6 +28,10 @@ public class CreateEmployeeByClient
|
||||
public List<AddEmployeeDocumentItem> EmployeeDocumentItems { get; set; }
|
||||
public bool HasEmployeeDocument { get; set; }
|
||||
public bool HasRollCallService { get; set; }
|
||||
public bool HasCustomizeCheckoutService { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد کارفرمای حقیقی
|
||||
/// </summary>
|
||||
public class CreateLegalEmployer
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن همراه
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن ثابت
|
||||
/// </summary>
|
||||
public string TelephoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerFName { get; set; }
|
||||
/// <summary>
|
||||
/// نام خانوادگی مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerLName { get; set; }
|
||||
/// <summary>
|
||||
/// جنسیت مدیر عامل
|
||||
/// </summary>
|
||||
public Gender EmployerGender { get; set; }
|
||||
/// <summary>
|
||||
/// کد ملی مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerNationalCode { get; set; }
|
||||
/// <summary>
|
||||
/// شماره شناسنامه مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerIdNumber { get; set; }
|
||||
/// <summary>
|
||||
/// نام پدر مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerFatherName { get; set; }
|
||||
/// <summary>
|
||||
/// تاریخ تولد مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerDateOfBirth { get; set; }
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerDateOfIssue { get; set; }
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه مدیر عامل
|
||||
/// </summary>
|
||||
public string EmployerPlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سامانه ای
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد کارفرما حقیقی
|
||||
/// </summary>
|
||||
public class CreateRealEmployer
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///نام خانوادگی
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن همراه
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن ثابت
|
||||
/// </summary>
|
||||
public string Telephone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه
|
||||
/// </summary>
|
||||
public string DateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه
|
||||
/// </summary>
|
||||
public string PlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد
|
||||
/// </summary>
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سامانه ای
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
public class EditLegalEmployer: CreateLegalEmployer
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی کارفرما
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
12
CompanyManagment.App.Contracts/Employer/EditRealEmployer.cs
Normal file
12
CompanyManagment.App.Contracts/Employer/EditRealEmployer.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش کارفرما حقیقی
|
||||
/// </summary>
|
||||
public class EditRealEmployer:CreateRealEmployer
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی کارفرما
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// مدل برای گرفتن لیست کارفرما
|
||||
/// </summary>
|
||||
public class GetEmployerListViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی کارفرما
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کدملی / شناسه ملی
|
||||
/// </summary>
|
||||
public string NationalCodeOrNationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارفرما
|
||||
/// </summary>
|
||||
public string FullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام های کارگاه
|
||||
/// </summary>
|
||||
public ICollection<string> WorkshopNames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دارای طرف حساب
|
||||
/// </summary>
|
||||
public bool HasContractingParty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// طرف حساب بلاک شده یا نه
|
||||
/// </summary>
|
||||
public bool HasBlockContractingParty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع کارفرما
|
||||
/// </summary>
|
||||
public LegalType LegalType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت کارفرما
|
||||
/// </summary>
|
||||
public ActivationStatus EmployerStatus { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// مدل جستجوی لیست کارفرما
|
||||
/// </summary>
|
||||
public class GetEmployerSearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// نام شرکت / نام و نام خانوادگی
|
||||
/// </summary>
|
||||
public string FullNameOrCompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کدملی/ شناسه ملی
|
||||
/// </summary>
|
||||
public string NationalCodeOrNationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه یا شماره ثبت
|
||||
/// </summary>
|
||||
public string IdNumberOrRegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت کارفرما
|
||||
/// </summary>
|
||||
public ActivationStatus EmployerStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع کارفرما
|
||||
/// </summary>
|
||||
public LegalType EmployerType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پیج ایندکس برای دسته بندی سی تایی
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات کارفرمای حقوقی
|
||||
/// </summary>
|
||||
public class GetLegalEmployerDetailViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی کارفرما
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن همراه
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن ثابت
|
||||
/// </summary>
|
||||
public string TelephoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد کارفرما
|
||||
/// </summary>
|
||||
public string EmployerNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارفرما
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارفرما
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام و خانوادگی مدیر عامل
|
||||
/// </summary>
|
||||
public string CeoFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام و خانوادگی مدیر عامل
|
||||
/// </summary>
|
||||
public string CeoFName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام و خانوادگی مدیر عامل
|
||||
/// </summary>
|
||||
public string CeoLName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت مدیر عامل
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنیست
|
||||
/// </summary>
|
||||
public string GenderStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ملیت
|
||||
/// </summary>
|
||||
public string Nationality { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد
|
||||
/// </summary>
|
||||
public string DateOfBirth { get; set; }
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه
|
||||
/// </summary>
|
||||
public string DateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه
|
||||
/// </summary>
|
||||
public string PlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سامانه های دولتی
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات کارفرمای حقوقی
|
||||
/// </summary>
|
||||
public class GetRealEmployerDetailViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی کارفرما
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام و نام خانوادگی
|
||||
/// </summary>
|
||||
public string FullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کدملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت فارسی
|
||||
/// </summary>
|
||||
public string GenderStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// جنسیت
|
||||
/// </summary>
|
||||
public Gender Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ملیت
|
||||
/// </summary>
|
||||
public string Nationality { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن همراه
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پدر
|
||||
/// </summary>
|
||||
public string FatherName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ تولد
|
||||
/// </summary>
|
||||
public string DateOfBirth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد کارفرما
|
||||
/// </summary>
|
||||
public string EmployerNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن ثابت
|
||||
/// </summary>
|
||||
public string TelephoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ صدور شناسنامه
|
||||
/// </summary>
|
||||
public string DateOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محل صدور شناسنامه
|
||||
/// </summary>
|
||||
public string PlaceOfIssue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سامانه های دولتی
|
||||
/// </summary>
|
||||
public GovernmentSystemInfo GovernmentSystemInfo { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Employer;
|
||||
|
||||
/// <summary>
|
||||
/// اطلاعات سامانه های دولتی
|
||||
/// </summary>
|
||||
public class GovernmentSystemInfo
|
||||
{
|
||||
#region MCL
|
||||
/// <summary>
|
||||
/// نام کاربری اداره کار
|
||||
/// </summary>
|
||||
public string MclUsername { get; set; }
|
||||
/// <summary>
|
||||
/// رمز عبور اداره کار
|
||||
/// </summary>
|
||||
public string MclPassword { get; set; }
|
||||
#endregion
|
||||
|
||||
#region E-Service تامین اجتماعی
|
||||
/// <summary>
|
||||
/// نام کاربری سازمان تامین اجتماعی
|
||||
/// </summary>
|
||||
public string EServiceUsername { get; set; }
|
||||
/// <summary>
|
||||
/// رمز عبور سازمان تامین اجتماعی
|
||||
/// </summary>
|
||||
public string EServicePassword { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Tax سامانه مالیاتی
|
||||
/// <summary>
|
||||
/// نام کاربری سامانه مالیاتی
|
||||
/// </summary>
|
||||
public string TaxUsername { get; set; }
|
||||
/// <summary>
|
||||
/// رمز عبور سامانه مالیاتی
|
||||
/// </summary>
|
||||
public string TaxPassword { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Sana سامانه ثنا
|
||||
/// <summary>
|
||||
/// نام کاربری ثنا
|
||||
/// </summary>
|
||||
public string SanaUsername { get; set; }
|
||||
/// <summary>
|
||||
/// رمز عبور ثنا
|
||||
/// </summary>
|
||||
public string SanaPassword { get; set; }
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -55,4 +55,71 @@ public interface IEmployerApplication
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Api
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارفرما ها
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<GetEmployerListViewModel>> GetEmployerList(GetEmployerSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات کارفرما حقوقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetLegalEmployerDetailViewModel> GetLegalEmployerDetail(long id);
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات کارفرما حقیقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetRealEmployerDetailViewModel> GetRealEmployerDetail(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد کارفرمای حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateReal(CreateRealEmployer command);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد کارفرمای حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateLegal(CreateLegalEmployer command);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش کارفرمای حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditReal(EditRealEmployer command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش کارفرمای حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditLegal(EditLegalEmployer command);
|
||||
|
||||
///// <summary>
|
||||
///// لیست نام کارفرما ها برای جستجو
|
||||
///// </summary>
|
||||
///// <param name="search"></param>
|
||||
///// <returns></returns>
|
||||
//public Task<List<EmployerSelectListViewModel>> GetSelectList(string search);
|
||||
|
||||
/// <summary>
|
||||
/// حذف کارفرما - درصورت داشتن کارگاه کارفرما غیرفعال میشود
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public Task<OperationResult<string>> RemoveApi(long id);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
public class ContractingPartyGetListSearchModel
|
||||
{
|
||||
/// <summary>
|
||||
/// تعدادی که برای لیست بعدی آیتم باید رد کنه
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شرکت یا نام و نام خانوادگی طرف حساب
|
||||
/// </summary>
|
||||
public string FullNameOrCompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی یا شماره ملی
|
||||
/// </summary>
|
||||
public string NationalIdOrNationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام معرف
|
||||
/// </summary>
|
||||
public string RepresentativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع طرف حساب
|
||||
/// </summary>
|
||||
public LegalType ContractingPartyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت طرف حساب
|
||||
/// </summary>
|
||||
public ActivationStatus ContractingPartyStatus { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application.Enums;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
public record ContractingPartyGetListEmployerViewModel(long EmployerId, string EmployerName);
|
||||
|
||||
public class ContractingPartyGetListViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد طرف حساب
|
||||
/// </summary>
|
||||
public int ArchiveCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی یا شماره ملی
|
||||
/// </summary>
|
||||
public string NationalIdOrNationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام طرف حساب
|
||||
/// </summary>
|
||||
public string ContractingPartyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارفرما ها
|
||||
/// </summary>
|
||||
public ICollection<ContractingPartyGetListEmployerViewModel> Employers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد بلاک
|
||||
/// </summary>
|
||||
public int BlockTimes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا بلاک هست
|
||||
/// </summary>
|
||||
public bool IsBlock { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دارای قرارداد مالی است
|
||||
/// </summary>
|
||||
public bool HasInstitutionContract { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع طرف حساب
|
||||
/// </summary>
|
||||
public LegalType ContractingPartyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت طرف حساب
|
||||
/// </summary>
|
||||
public ActivationStatus Status { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
public class ContractingPartySelectListViewModel: SelectListViewModel
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
public class CreateLegalContractingParty
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی معرف
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long RepresentativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شرکت
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شناسه ملی
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد طرف حساب
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int ArchiveCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مستعار
|
||||
/// </summary>
|
||||
public string SureName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن نماینده
|
||||
/// </summary>
|
||||
public string AgentPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محله
|
||||
/// </summary>
|
||||
public string Zone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نشانی
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
public class CreateRealContractingParty
|
||||
{
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی معرف
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long RepresentativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد طرف حساب
|
||||
/// </summary>
|
||||
[Required]
|
||||
public int ArchiveCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مستعار
|
||||
/// </summary>
|
||||
public string SureName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن نماینده
|
||||
/// </summary>
|
||||
public string AgentPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محله
|
||||
/// </summary>
|
||||
public string Zone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نشانی
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرف حساب حقوقی
|
||||
/// </summary>
|
||||
public class EditLegalContractingParty:CreateLegalContractingParty
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرف حساب حقیقی
|
||||
/// </summary>
|
||||
public class EditRealContractingParty:CreateRealContractingParty
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
/// <summary>
|
||||
/// شماره ملی یا شناسه ملی بر اساس حقیقی یا حقوقی بودن
|
||||
/// </summary>
|
||||
public class GetContractingPartyNationalCodeOrNationalIdViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// شماره ملی یا شناسه ملی
|
||||
/// </summary>
|
||||
public string NationalCodeOrNationalId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
/// <summary>
|
||||
/// ویو مدل جزئیات طرف حساب حقوقی
|
||||
/// </summary>
|
||||
public class GetLegalContractingPartyDetailsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کامل شرکت(به همراه نام مستعار)ء
|
||||
/// </summary>
|
||||
public string CompanyFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام شرکت (بدون نام مستعار)ء
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مستعار
|
||||
/// </summary>
|
||||
public string SureName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ثبت
|
||||
/// </summary>
|
||||
public string RegisterId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره ملی
|
||||
/// </summary>
|
||||
public string NationalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تماس
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تماس نماینده
|
||||
/// </summary>
|
||||
public string AgentPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آدرس
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// معرف
|
||||
/// </summary>
|
||||
public string RepresentativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی معرف
|
||||
/// </summary>
|
||||
public long RepresentativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد طرف حساب
|
||||
/// </summary>
|
||||
public int ArchiveCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محله
|
||||
/// </summary>
|
||||
public string Zone { get; set; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
|
||||
/// <summary>
|
||||
/// ویو مدل جزئیات طرف حساب حقیقی
|
||||
/// </summary>
|
||||
public class GetRealContractingPartyDetailsViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیدی طرف حساب
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام
|
||||
/// </summary>
|
||||
public string FName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام خانوادگی
|
||||
/// </summary>
|
||||
public string LName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام و نام خانوادگی
|
||||
/// </summary>
|
||||
public string FullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد ملی
|
||||
/// </summary>
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره شناسنامه
|
||||
/// </summary>
|
||||
public string IdNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن
|
||||
/// </summary>
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شماره تلفن نماینده
|
||||
/// </summary>
|
||||
public string AgentPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آدرس
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نام معرف
|
||||
/// </summary>
|
||||
public string RepresentativeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیدی معرف
|
||||
/// </summary>
|
||||
public long RepresentativeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام مستعار
|
||||
/// </summary>
|
||||
public string SureName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// کد طرف حساب
|
||||
/// </summary>
|
||||
public int ArchiveCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// استان
|
||||
/// </summary>
|
||||
public string State { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شهر
|
||||
/// </summary>
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// محله
|
||||
/// </summary>
|
||||
public string Zone { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using _0_Framework.Application;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
@@ -54,4 +55,79 @@ public interface IPersonalContractingPartyApp
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Api
|
||||
/// <summary>
|
||||
/// لیست طرف حساب ها
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ICollection<ContractingPartyGetListViewModel>> GetList(ContractingPartyGetListSearchModel searchModel);
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرف حساب برای سلکت لیست سرچ
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<ContractingPartySelectListViewModel>> GetSelectList();
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرف حساب حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateReal(CreateRealContractingParty command);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد ظرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateLegal(CreateLegalContractingParty command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// لیستی از شماره ملی یا شناسه ملی بر اساس حقیقی یا حقوقی بودن
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<List<GetContractingPartyNationalCodeOrNationalIdViewModel>> GetNationalCodeOrNationalId();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// حذف طرف حساب. در صورتی که طرف حساب دارای قرارداد مالی یا دارای کارفرما باشد غیرفعال میشود
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult<string>> Delete(long id);
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرف حساب حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult EditRealApi(EditRealContractingParty command);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
OperationResult EditLegal(EditLegalContractingParty command);
|
||||
|
||||
/// <summary>
|
||||
/// گرفتن جزئیات طرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetRealContractingPartyDetailsViewModel> GetRealDetails(long id);
|
||||
|
||||
/// <summary>
|
||||
/// گرفتن جزئیات طرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -47,4 +47,6 @@ public class PersonalContractingPartyViewModel
|
||||
public bool IsAuthenticated { get; set; }
|
||||
public List<EmployerViewModel> EmployerList { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
@@ -38,7 +39,7 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command);
|
||||
Task<OperationResult> CreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command, long contractingPartyTempId);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت جمع کل خدمات برای یک کارگاه
|
||||
@@ -55,14 +56,14 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// <param name="paymentModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId,
|
||||
string periodModel = "12", string paymentModel = "OneTime");
|
||||
string periodModel = "12", string paymentModel = "OneTime", string contractStartType = "currentMonth");
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد یا ویرایش قرارداد موقت
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax);
|
||||
Task<OperationResult> CreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax, DateTime contractStart);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت کد برای کلاینت
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
public class MonthlyInstallment
|
||||
{
|
||||
/// <summary>
|
||||
/// مبلغ قسط ماهانه
|
||||
/// </summary>
|
||||
public string InstallmentAmountStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ قسط ماهانه
|
||||
/// </summary>
|
||||
public string InstalmentDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// شمارنده قسط
|
||||
/// </summary>
|
||||
public string InstallmentCounter{ get; set; }
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
@@ -23,28 +24,54 @@ public class ReviewAndPaymentViewModel
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double WithoutTaxPaymentDouble { get; set; }
|
||||
public double OneTimeWithoutTaxPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// string
|
||||
/// </summary>
|
||||
public string WithoutTaxPaymentStr { get; set; }
|
||||
public string OneTimeWithoutTaxPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double TotalPaymentDouble { get; set; }
|
||||
public double OneTimeTotalPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// string
|
||||
/// </summary>
|
||||
public string TotalPaymentStr { get; set; }
|
||||
public string OneTimeTotalPaymentStr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double MonthlyWithoutTaxPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت بدون مالیات
|
||||
/// string
|
||||
/// </summary>
|
||||
public string MonthlyWithoutTaxPaymentStr { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// Double
|
||||
/// </summary>
|
||||
public double MonthlyTotalPaymentDouble { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مبلغ پرداخت کامل
|
||||
/// string
|
||||
/// </summary>
|
||||
public string MonthlyTotalPaymentStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مالیات بر ارزش افزوده
|
||||
/// Double
|
||||
@@ -83,4 +110,52 @@ public class ReviewAndPaymentViewModel
|
||||
/// آی دی طرف حساب
|
||||
/// </summary>
|
||||
public long ContractingPartTempId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست اقساط ماهیانه
|
||||
/// </summary>
|
||||
public List<MonthlyInstallment> MonthlyInstallments { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه جاری
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractStartCurrentMonthFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه جاری
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractStartCurrentMonthGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه بعد
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractStartNextMonthFa{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه بعد
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractStartNextMonthGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان قرارداد
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractEndGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان قرارداد
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractEndFa { get; set; }
|
||||
}
|
||||
70
CompanyManagment.Application/ContactUsApplication.cs
Normal file
70
CompanyManagment.Application/ContactUsApplication.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.ContactUsAgg;
|
||||
using CompanyManagment.App.Contracts.ContactUs;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class ContactUsApplication : IContactUsApplication
|
||||
{
|
||||
private readonly IContactUsRepository _contactUsRepository;
|
||||
|
||||
public ContactUsApplication(IContactUsRepository contactUsRepository)
|
||||
{
|
||||
_contactUsRepository = contactUsRepository;
|
||||
}
|
||||
|
||||
public OperationResult Create(CreateContactUs command)
|
||||
{
|
||||
var op = new OperationResult();
|
||||
if (string.IsNullOrWhiteSpace(command.FirstName))
|
||||
{
|
||||
return op.Failed("لطفا نام خود را وارد کنید");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.LastName))
|
||||
{
|
||||
return op.Failed("لطفا نام خانوادگی خود را وارد کنید");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.Email))
|
||||
{
|
||||
return op.Failed("لطفا ایمیل خود را وارد کنید");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.PhoneNumber))
|
||||
{
|
||||
return op.Failed("لطفا شماره تماس خود را وارد کنید");
|
||||
}
|
||||
|
||||
if (!Regex.IsMatch(command.PhoneNumber, @"^(\+98|0)?9\d{9}$"))
|
||||
{
|
||||
return op.Failed("شماره تماس وارد شده نامعتبر است");
|
||||
}
|
||||
|
||||
if (!Regex.IsMatch(command.Email, @"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$"))
|
||||
{
|
||||
return op.Failed("ایمیل وارد شده نامعتبر است");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.Title))
|
||||
{
|
||||
return op.Failed("لطفا عنوان پیغام خود را وارد کنید");
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.Message))
|
||||
{
|
||||
return op.Failed("لطفا پیغام خود را وارد کنید");
|
||||
}
|
||||
|
||||
var entity = new ContactUs(command.FirstName, command.LastName, command.Email, command.PhoneNumber,
|
||||
command.Title, command.Message);
|
||||
|
||||
_contactUsRepository.Create(entity);
|
||||
|
||||
_contactUsRepository.SaveChanges();
|
||||
|
||||
return op.Succcedded();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,13 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
using Company.Domain.CheckoutAgg;
|
||||
using Company.Domain.CustomizeCheckoutAgg;
|
||||
using Company.Domain.CustomizeCheckoutTempAgg;
|
||||
using CompanyManagment.EFCore.Repository;
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using Hangfire.States;
|
||||
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
@@ -372,10 +373,10 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
}
|
||||
|
||||
if (customizeWorkshopGroupSettings.MainGroup)
|
||||
{
|
||||
var createDefaultEmployee = CreateEmployeeSettings(command);
|
||||
return createDefaultEmployee;
|
||||
}
|
||||
{
|
||||
var createDefaultEmployee = CreateEmployeeSettings(command);
|
||||
return createDefaultEmployee;
|
||||
}
|
||||
|
||||
|
||||
List<CustomizeWorkshopEmployeeSettingsShift> shiftCollection = new List<CustomizeWorkshopEmployeeSettingsShift>();
|
||||
@@ -557,7 +558,13 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
|
||||
_customizeWorkshopEmployeeSettingsRepository.Create(entity);
|
||||
|
||||
entity.SimpleEdit(shiftCollection, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime, isChanged, command.FridayWork, command.HolidayWork, rotatingShift);
|
||||
entity.SimpleEdit(shiftCollection, command.IrregularShift, command.WorkshopShiftStatus, command.BreakTime, isChanged, command.FridayWork, command.HolidayWork, rotatingShift);
|
||||
var employeeSalary = command.Salary?.MoneyToDouble() ?? 0;
|
||||
|
||||
if (employeeSalary > 0)
|
||||
{
|
||||
entity.SetSalary(employeeSalary);
|
||||
}
|
||||
|
||||
_customizeWorkshopGroupSettingsRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
@@ -681,7 +688,7 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
return op.Succcedded();
|
||||
}
|
||||
public OperationResult EditSimpleRollCallGroupSetting(EditCustomizeWorkshopGroupSettings command,
|
||||
List<ReCalculateRollCallValues> reCalculateCommand)
|
||||
List<ReCalculateRollCallValues> reCalculateCommand)
|
||||
{
|
||||
OperationResult op = new();
|
||||
|
||||
@@ -712,15 +719,15 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
{
|
||||
|
||||
groupSettingsShifts = command.ShiftViewModel.Select(x =>
|
||||
{
|
||||
if (!TimeOnly.TryParseExact(x.StartTime, "HH:mm", out TimeOnly start))
|
||||
throw new InvalidDataException();
|
||||
if (!TimeOnly.TryParseExact(x.EndTime, "HH:mm", out TimeOnly end))
|
||||
throw new InvalidDataException();
|
||||
{
|
||||
if (!TimeOnly.TryParseExact(x.StartTime, "HH:mm", out TimeOnly start))
|
||||
throw new InvalidDataException();
|
||||
if (!TimeOnly.TryParseExact(x.EndTime, "HH:mm", out TimeOnly end))
|
||||
throw new InvalidDataException();
|
||||
|
||||
return new CustomizeWorkshopGroupSettingsShift(start, end, x.Placement);
|
||||
return new CustomizeWorkshopGroupSettingsShift(start, end, x.Placement);
|
||||
|
||||
}).ToList();
|
||||
}).ToList();
|
||||
|
||||
if (groupSettingsShifts.All(x => workshopSettings.CustomizeWorkshopSettingsShifts.Any(y => x.Equals(y)))
|
||||
&& command.WorkshopShiftStatus == workshopSettings.WorkshopShiftStatus && command.FridayWork == workshopSettings.FridayWork &&
|
||||
@@ -1589,10 +1596,6 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
return _customizeWorkshopGroupSettingsRepository.GetEmployeesGroupSettingsByEmployeeId(employeeId, workshopId);
|
||||
}
|
||||
|
||||
public bool HasAnyEmployeeWithoutGroup(long workshopId)
|
||||
{
|
||||
return _customizeWorkshopGroupSettingsRepository.HasAnyEmployeeWithoutGroup(workshopId);
|
||||
}
|
||||
public OperationResult<List<long>> ValidateReCalculateValueForGroupEdit(List<ReCalculateRollCallValues> commands,
|
||||
long workshopId)
|
||||
{
|
||||
@@ -1623,10 +1626,16 @@ public class CustomizeWorkshopSettingsApplication(ICustomizeWorkshopSettingsRepo
|
||||
|
||||
employeeIdsHasCheckout = employeeIdsHasCheckout.Distinct().ToList();
|
||||
return isSuccess ?
|
||||
operationResult.Succcedded(employeeIdsHasCheckout)
|
||||
operationResult.Succcedded(employeeIdsHasCheckout)
|
||||
:
|
||||
operationResult.Failed("پرسنل هایی دارای فیش هستند لطفا نسبت به تعیین تکلیف این ها اقدام نمایید", employeeIdsHasCheckout);
|
||||
}
|
||||
|
||||
public bool HasAnyEmployeeWithoutGroup(long workshopId)
|
||||
{
|
||||
return _customizeWorkshopGroupSettingsRepository.HasAnyEmployeeWithoutGroup(workshopId);
|
||||
}
|
||||
|
||||
public bool CheckEmployeeShiftHasChanged(EditCustomizeEmployeeSettings command)
|
||||
{
|
||||
return _customizeWorkshopEmployeeSettingsRepository.CheckEmployeeShiftHasChanged(command);
|
||||
|
||||
@@ -1,35 +1,38 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.EFCore;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.EmployeeInsuranceRecord;
|
||||
using Company.Domain.EmployeeInsuranceRecordAgg;
|
||||
using Company.Domain.LeftWorkAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.EmployeeInsuranceRecord;
|
||||
using CompanyManagment.EFCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Transactions;
|
||||
using Company.Domain.EmployeeClientTempAgg;
|
||||
using Company.Domain.PersonnelCodeAgg;
|
||||
using EmployeeInsuranceRecord = Company.Domain.EmployeeInsuranceRecordAgg.EmployeeInsuranceRecord;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using System.IO;
|
||||
using _0_Framework.Application.UID;
|
||||
using Company.Domain.CustomizeWorkshopEmployeeSettingsAgg;
|
||||
using Company.Domain.CustomizeWorkshopGroupSettingsAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using Company.Domain.LeftWorkTempAgg;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.CustomizeWorkshopSettings;
|
||||
using CompanyManagment.App.Contracts.EmployeeBankInformation;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using System.IO;
|
||||
using System.Transactions;
|
||||
using Company.Domain.EmployeeClientTempAgg;
|
||||
using Company.Domain.LeftWorkTempAgg;
|
||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||
using _0_Framework.Application.UID;
|
||||
using Company.Domain.CustomizeWorkshopEmployeeSettingsAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using Company.Domain.CustomizeWorkshopGroupSettingsAgg;
|
||||
using Company.Domain.LeftWorkAgg;
|
||||
using RollCallEmployee = Company.Domain.RollCallEmployeeAgg.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.Employee.DTO;
|
||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||
using System.Reflection;
|
||||
using Company.Domain.EmployeeAuthorizeTempAgg;
|
||||
using Company.Domain.RollCallServiceAgg;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Company.Domain.LeftWorkInsuranceAgg;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
@@ -38,6 +41,9 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
{
|
||||
private readonly IEmployeeRepository _EmployeeRepository;
|
||||
private readonly IWorkshopRepository _WorkShopRepository;
|
||||
private readonly ILeftWorkRepository _leftWorkRepository;
|
||||
private readonly IPersonnelCodeRepository _personnelCodeRepository;
|
||||
private readonly IEmployeeClientTempRepository _employeeClientTempRepository;
|
||||
private readonly CompanyContext _context;
|
||||
public bool nationalCodValid = false;
|
||||
public bool idnumberIsOk = true;
|
||||
@@ -55,17 +61,32 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
private readonly ILeftWorkTempRepository _leftWorkTempRepository;
|
||||
private readonly IUidService _uidService;
|
||||
private readonly ICustomizeWorkshopEmployeeSettingsRepository _customizeWorkshopEmployeeSettingsRepository;
|
||||
private readonly ILeftWorkRepository _leftWorkRepository;
|
||||
private readonly IPersonnelCodeRepository _personnelCodeRepository;
|
||||
private readonly IEmployeeClientTempRepository _employeeClientTempRepository;
|
||||
private readonly ICustomizeWorkshopGroupSettingsRepository _customizeWorkshopGroupSettingsRepository;
|
||||
private readonly IEmployeeAuthorizeTempRepository _employeeAuthorizeTempRepository;
|
||||
private readonly ILeftWorkInsuranceRepository _leftWorkInsuranceRepository ;
|
||||
private readonly IRollCallServiceRepository _rollCallServiceRepository;
|
||||
|
||||
public EmployeeAplication(IEmployeeRepository employeeRepository, CompanyContext context, IWorkshopRepository workShopRepository, IWebHostEnvironment webHostEnvironment, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication, IRollCallEmployeeRepository rollCallEmployeeRepository, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication, IEmployeeDocumentsApplication employeeDocumentsApplication, IEmployeeDocumentsRepository employeeDocumentsRepository, IEmployeeBankInformationApplication employeeBankInformationApplication, ILeftWorkTempRepository leftWorkTempRepository, IUidService uidService, ICustomizeWorkshopEmployeeSettingsRepository customizeWorkshopEmployeeSettingsRepository, IPersonnelCodeRepository personnelCodeRepository, IEmployeeClientTempRepository employeeClientTempRepository, ICustomizeWorkshopGroupSettingsRepository customizeWorkshopGroupSettingsRepository, ILeftWorkRepository leftWorkRepository, IEmployeeAuthorizeTempRepository employeeAuthorizeTempRepository, ILeftWorkInsuranceRepository leftWorkInsuranceRepository) : base(context)
|
||||
public EmployeeAplication(IEmployeeRepository employeeRepository, CompanyContext context,
|
||||
IWorkshopRepository workShopRepository,
|
||||
ILeftWorkRepository leftWorkRepository, IPersonnelCodeRepository personnelCodeRepository,
|
||||
IEmployeeClientTempRepository employeeClientTempRepository, IWebHostEnvironment webHostEnvironment,
|
||||
IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication,
|
||||
IRollCallEmployeeRepository rollCallEmployeeRepository,
|
||||
ICustomizeWorkshopGroupSettingsRepository customizeWorkshopGroupSettingsRepository,
|
||||
ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication,
|
||||
IEmployeeDocumentsApplication employeeDocumentsApplication,
|
||||
IEmployeeBankInformationApplication employeeBankInformationApplication,
|
||||
ILeftWorkTempRepository leftWorkTempRepository,
|
||||
IUidService uidService,
|
||||
ICustomizeWorkshopEmployeeSettingsRepository customizeWorkshopEmployeeSettingsRepository,
|
||||
IEmployeeAuthorizeTempRepository employeeAuthorizeTempRepository,
|
||||
IRollCallServiceRepository rollCallServiceRepository, ILeftWorkInsuranceRepository leftWorkInsuranceRepository) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
_WorkShopRepository = workShopRepository;
|
||||
_EmployeeRepository = employeeRepository;
|
||||
this._leftWorkRepository = leftWorkRepository;
|
||||
_personnelCodeRepository = personnelCodeRepository;
|
||||
_employeeClientTempRepository = employeeClientTempRepository;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
|
||||
_rollCallEmployeeRepository = rollCallEmployeeRepository;
|
||||
@@ -75,19 +96,17 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
_leftWorkTempRepository = leftWorkTempRepository;
|
||||
_uidService = uidService;
|
||||
_customizeWorkshopEmployeeSettingsRepository = customizeWorkshopEmployeeSettingsRepository;
|
||||
_personnelCodeRepository = personnelCodeRepository;
|
||||
_employeeClientTempRepository = employeeClientTempRepository;
|
||||
_leftWorkRepository = leftWorkRepository;
|
||||
_employeeAuthorizeTempRepository = employeeAuthorizeTempRepository;
|
||||
_leftWorkInsuranceRepository = leftWorkInsuranceRepository;
|
||||
_EmployeeRepository = employeeRepository;
|
||||
_rollCallServiceRepository = rollCallServiceRepository;
|
||||
}
|
||||
|
||||
public OperationResult Create(CreateEmployee command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
if (_EmployeeRepository.Exists(x =>
|
||||
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.NationalCode != null && x.IsActiveString == "true"))
|
||||
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.NationalCode != null))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber !=null))
|
||||
@@ -105,7 +124,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
if (command.Address != null && command.State == null)
|
||||
{
|
||||
@@ -144,8 +163,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
{
|
||||
case "0000000000":
|
||||
case "1111111111":
|
||||
case "22222222222":
|
||||
case "33333333333":
|
||||
case "2222222222":
|
||||
case "3333333333":
|
||||
case "4444444444":
|
||||
case "5555555555":
|
||||
case "6666666666":
|
||||
@@ -197,9 +216,9 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
return opration.Failed("کد ملی وارد شده تکراری است");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
string initial = "1300/10/11";
|
||||
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
||||
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
||||
@@ -224,9 +243,10 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
return opration.Succcedded(employeeData.id);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public OperationResult Edit(EditEmployee command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
@@ -235,11 +255,11 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
if (_EmployeeRepository.Exists(x =>
|
||||
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id && x.IsActiveString == "true"))
|
||||
x.LName == command.LName && x.NationalCode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
//if (_EmployeeRepository.Exists(x => x.IdNumber == command.IdNumber && x.IdNumber != null && x.id != command.Id))
|
||||
// return opration.Failed("شماره شناسنامه وارد شده تکراری است");
|
||||
|
||||
|
||||
if (command.Address != null && command.State == null)
|
||||
{
|
||||
StatCity = false;
|
||||
@@ -277,8 +297,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
{
|
||||
case "0000000000":
|
||||
case "1111111111":
|
||||
case "22222222222":
|
||||
case "33333333333":
|
||||
case "2222222222":
|
||||
case "3333333333":
|
||||
case "4444444444":
|
||||
case "5555555555":
|
||||
case "6666666666":
|
||||
@@ -331,7 +351,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
string initial = "1300/10/11";
|
||||
var dateOfBirth = command.DateOfBirth != null ? command.DateOfBirth.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
||||
var dateOfIssue = command.DateOfIssue != null ? command.DateOfIssue.ToGeorgianDateTime() : initial.ToGeorgianDateTime();
|
||||
@@ -339,7 +359,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
dateOfIssue,
|
||||
command.PlaceOfIssue, command.NationalCode, command.IdNumber, command.Gender, command.Nationality,
|
||||
command.Phone, command.Address,
|
||||
command.State,command.City, command.MaritalStatus, command.MilitaryService, command.LevelOfEducation,
|
||||
command.State, command.City, command.MaritalStatus, command.MilitaryService, command.LevelOfEducation,
|
||||
command.FieldOfStudy, command.BankCardNumber,
|
||||
command.BankBranch, command.InsuranceCode, command.InsuranceHistoryByYear,
|
||||
command.InsuranceHistoryByMonth, command.NumberOfChildren, command.OfficePhone
|
||||
@@ -352,7 +372,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
return opration.Succcedded();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public EditEmployee GetDetails(long id)
|
||||
@@ -360,6 +380,11 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
return _EmployeeRepository.GetDetails(id);
|
||||
}
|
||||
|
||||
public EditEmployee GetDetailsIgnoreQueryFilter(long id)
|
||||
{
|
||||
return _EmployeeRepository.GetDetails(id);
|
||||
}
|
||||
|
||||
public OperationResult Active(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
@@ -398,8 +423,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
public async Task<List<EmployeeViewModel>> Search(EmployeeSearchModel searchModel)
|
||||
{
|
||||
var res=await _EmployeeRepository.Search(searchModel);
|
||||
|
||||
var res = await _EmployeeRepository.Search(searchModel);
|
||||
|
||||
foreach (var item in res)
|
||||
{
|
||||
var children = _context.EmployeeChildrenSet.Count(x => x.EmployeeId == item.Id);
|
||||
@@ -690,8 +715,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
{
|
||||
case "0000000000":
|
||||
case "1111111111":
|
||||
case "22222222222":
|
||||
case "33333333333":
|
||||
case "2222222222":
|
||||
case "3333333333":
|
||||
case "4444444444":
|
||||
case "5555555555":
|
||||
case "6666666666":
|
||||
@@ -820,8 +845,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
{
|
||||
case "0000000000":
|
||||
case "1111111111":
|
||||
case "22222222222":
|
||||
case "33333333333":
|
||||
case "2222222222":
|
||||
case "3333333333":
|
||||
case "4444444444":
|
||||
case "5555555555":
|
||||
case "6666666666":
|
||||
@@ -901,11 +926,17 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Pooya
|
||||
|
||||
|
||||
public List<EmployeeViewModel> GetWorkingEmployeesByWorkshopId(long workshopId)
|
||||
{
|
||||
return _EmployeeRepository.GetWorkingEmployeesByWorkshopId(workshopId);
|
||||
}
|
||||
|
||||
public EmployeeViewModel GetEmployeeByNationalCodeIfHasActiveLeftWork(string nationalCode, List<long> workshopIds)
|
||||
{
|
||||
if (nationalCode.NationalCodeValid() != "valid")
|
||||
@@ -913,7 +944,6 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
var workshopEmployeesWithLeftWork = _EmployeeRepository.GetWorkingEmployeesByWorkshopIdsAndNationalCodeAndDate(workshopIds, nationalCode, DateTime.Now.Date);
|
||||
return workshopEmployeesWithLeftWork.FirstOrDefault();
|
||||
}
|
||||
|
||||
public EmployeeViewModel GetEmployeeByNationalCodeIfHasLeftWork(string nationalCode, List<long> workshopIds)
|
||||
{
|
||||
if (nationalCode.NationalCodeValid() != "valid")
|
||||
@@ -921,11 +951,8 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
var workshopEmployeesWithLeftWork = _EmployeeRepository.GetWorkedEmployeesByWorkshopIdsAndNationalCodeAndDate(workshopIds, nationalCode, DateTime.Now.Date);
|
||||
return workshopEmployeesWithLeftWork.FirstOrDefault();
|
||||
}
|
||||
public List<EmployeeViewModel> GetWorkingEmployeesByWorkshopId(long workshopId)
|
||||
{
|
||||
return _EmployeeRepository.GetWorkingEmployeesByWorkshopId(workshopId);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List<EmployeeViewModel> GetRangeByIds(IEnumerable<long> employeeIds)
|
||||
{
|
||||
@@ -961,6 +988,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mahan
|
||||
@@ -1052,6 +1080,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
_personnelCodeRepository.SaveChanges();
|
||||
}
|
||||
|
||||
var rollCallService = _rollCallServiceRepository.GetActiveServiceByWorkshopId(command.WorkshopId);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.RollCallUploadEmployeePicture?.Picture1) == false &&
|
||||
string.IsNullOrWhiteSpace(command.RollCallUploadEmployeePicture?.Picture2) == false)
|
||||
@@ -1061,14 +1090,14 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
Directory.CreateDirectory(directoryPath);
|
||||
|
||||
var filePath1 = Path.Combine(directoryPath) + $@"\1.jpg";
|
||||
|
||||
CreateImageFromBase64(command.RollCallUploadEmployeePicture.Picture1, filePath1);
|
||||
|
||||
|
||||
CreateImageFromBase64(command.RollCallUploadEmployeePicture.Picture1, filePath1);
|
||||
|
||||
|
||||
var filePath2 = Path.Combine(directoryPath) + $@"\2.jpg";
|
||||
|
||||
CreateImageFromBase64(command.RollCallUploadEmployeePicture.Picture2, filePath2);
|
||||
|
||||
|
||||
CreateImageFromBase64(command.RollCallUploadEmployeePicture.Picture2, filePath2);
|
||||
|
||||
|
||||
|
||||
var rollCallEmployee =
|
||||
@@ -1101,6 +1130,16 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
if (command.CreateCustomizeEmployeeSettings.GroupId > 0)
|
||||
{
|
||||
if (rollCallService?.HasCustomizeCheckoutService == "true")
|
||||
{
|
||||
var employeeSalary = command.CreateCustomizeEmployeeSettings.Salary?.MoneyToDouble() ?? 0;
|
||||
|
||||
if (employeeSalary < 1)
|
||||
{
|
||||
return op.Failed("لطفا حقوق پرسنل را وارد کنید");
|
||||
}
|
||||
|
||||
}
|
||||
if (_customizeWorkshopEmployeeSettingsRepository
|
||||
.Exists(x => x.WorkshopId == workshop.Id && x.EmployeeId == employee.id))
|
||||
{
|
||||
@@ -1128,6 +1167,16 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
}
|
||||
else if (command.CreateCustomizeEmployeeSettings.GroupId > 0)
|
||||
{
|
||||
if (rollCallService?.HasCustomizeCheckoutService == "true")
|
||||
{
|
||||
var employeeSalary = command.CreateCustomizeEmployeeSettings.Salary?.MoneyToDouble() ?? 0;
|
||||
|
||||
if (employeeSalary < 1)
|
||||
{
|
||||
return op.Failed("لطفا حقوق پرسنل را وارد کنید");
|
||||
}
|
||||
|
||||
}
|
||||
if (_customizeWorkshopEmployeeSettingsRepository
|
||||
.Exists(x => x.WorkshopId == workshop.Id && x.EmployeeId == employee.id))
|
||||
{
|
||||
@@ -1221,6 +1270,7 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
byte[] bytes = Convert.FromBase64String(subBase64);
|
||||
System.IO.File.WriteAllBytes(filePath, bytes);
|
||||
}
|
||||
|
||||
public async Task<OperationResult<EmployeeByNationalCodeInWorkshopViewModel>>
|
||||
ValidateCreateEmployeeClientByNationalCodeAndWorkshopId(string nationalCode, string birthDate, long workshopId)
|
||||
{
|
||||
@@ -1510,9 +1560,9 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
{
|
||||
employee.EditAuthorizeEmployee(employee.DateOfIssue, employee.PlaceOfIssue,
|
||||
employee.Phone, employee.Address, employee.State, employee.City, command.MaritalStatus,
|
||||
command.MilitaryService, employee.LevelOfEducation, employee.FieldOfStudy,
|
||||
command.MilitaryService, employee.LevelOfEducation, employee.FieldOfStudy,
|
||||
employee.BankCardNumber, employee.BankBranch, employee.InsuranceCode,
|
||||
employee.InsuranceHistoryByYear, employee.InsuranceHistoryByMonth, employee.NumberOfChildren,
|
||||
employee.InsuranceHistoryByYear, employee.InsuranceHistoryByMonth, employee.NumberOfChildren,
|
||||
employee.OfficePhone, employee.MclsUserName, employee.MclsPassword,
|
||||
employee.EserviceUserName, employee.EservicePassword, employee.TaxOfficeUserName,
|
||||
employee.TaxOfficepassword, employee.SanaUserName, employee.SanaPassword);
|
||||
@@ -1626,6 +1676,5 @@ public class EmployeeAplication : RepositoryBase<long, Employee>, IEmployeeAppli
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Exceptions;
|
||||
using Company.Domain.empolyerAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
@@ -957,4 +958,256 @@ public class EmployerApplication : IEmployerApplication
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Api
|
||||
public async Task<List<GetEmployerListViewModel>> GetEmployerList(GetEmployerSearchModel searchModel)
|
||||
{
|
||||
return await _EmployerRepository.GetEmployerList(searchModel);
|
||||
}
|
||||
public async Task<GetLegalEmployerDetailViewModel> GetLegalEmployerDetail(long id)
|
||||
{
|
||||
var employer = await _EmployerRepository.GetLegalEmployerDetail(id);
|
||||
if (employer == null)
|
||||
{
|
||||
throw new NotFoundException("کارفرمای مورد نطر یافت نشد");
|
||||
}
|
||||
return employer;
|
||||
|
||||
}
|
||||
|
||||
public async Task<GetRealEmployerDetailViewModel> GetRealEmployerDetail(long id)
|
||||
{
|
||||
var employer = await _EmployerRepository.GetRealEmployerDetail(id);
|
||||
if (employer == null)
|
||||
{
|
||||
throw new NotFoundException("کارفرمای مورد نطر یافت نشد");
|
||||
}
|
||||
return employer;
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateReal(CreateRealEmployer command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
if (_EmployerRepository.Exists(x =>
|
||||
(x.FName == command.FName && x.LName == command.LName) && x.Nationalcode == command.NationalCode && x.Nationalcode != null))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.FName))
|
||||
return opration.Failed("لطفا نام را وارد کنید");
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(command.NationalCode))
|
||||
{
|
||||
if (command.NationalCode.NationalCodeValid() != "valid")
|
||||
{
|
||||
return opration.Failed("کدملی وارد شده نامعتبر است");
|
||||
}
|
||||
if (_EmployerRepository.Exists(x => x.Nationalcode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode)))
|
||||
{
|
||||
return opration.Failed("کد ملی وارد شده تکراری است");
|
||||
}
|
||||
}
|
||||
string initial = "1300/10/11";
|
||||
var dateOfBirth = command.DateOfBirth?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
var dateOfIssue = command.DateOfIssue?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
|
||||
var gender = command.Gender switch
|
||||
{
|
||||
Gender.Male => "مرد",
|
||||
Gender.Female => "زن",
|
||||
Gender.None => null,
|
||||
_ => throw new BadRequestException("جنسیت وارد شده نامعتبر است")
|
||||
};
|
||||
|
||||
var employerData = new Employer(command.FName, command.LName, command.ContractingPartyId, gender,
|
||||
command.NationalCode, command.IdNumber, "ایرانی", command.FatherName, dateOfBirth,
|
||||
dateOfIssue, command.PlaceOfIssue, "*", "*", "*", "حقیقی", command.PhoneNumber,
|
||||
command.Telephone, "true", command.GovernmentSystemInfo.MclUsername, command.GovernmentSystemInfo.MclPassword, command.GovernmentSystemInfo.EServiceUsername, command.GovernmentSystemInfo.EServicePassword,
|
||||
command.GovernmentSystemInfo.TaxUsername, command.GovernmentSystemInfo.TaxPassword, command.GovernmentSystemInfo.SanaUsername, command.GovernmentSystemInfo.SanaPassword);
|
||||
|
||||
await _EmployerRepository.CreateAsync(employerData);
|
||||
await _EmployerRepository.SaveChangesAsync();
|
||||
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateLegal(CreateLegalEmployer command)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(command.EmployerLName))
|
||||
command.EmployerLName = "#";
|
||||
var opration = new OperationResult();
|
||||
if (_EmployerRepository.Exists(x =>
|
||||
x.LName == command.CompanyName && x.NationalId == command.NationalId && x.EmployerLName == command.EmployerLName))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
if (_EmployerRepository.Exists(x => x.NationalId == command.NationalId && !string.IsNullOrWhiteSpace(command.NationalId) && x.NationalId != null))
|
||||
{
|
||||
return opration.Failed(" شناسه ملی وارد شده تکراری است");
|
||||
}
|
||||
if (_EmployerRepository.Exists(x => x.LName == command.CompanyName))
|
||||
{
|
||||
return opration.Failed("نام شرکت وارد شده تکراری است");
|
||||
}
|
||||
if (_EmployerRepository.Exists(x => x.RegisterId == command.RegisterId && !string.IsNullOrWhiteSpace(command.RegisterId) && x.RegisterId != null))
|
||||
{
|
||||
return opration.Failed(" شماره ثبت وارد شده تکراری است");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(command.NationalId) && command.NationalId.Length != 11)
|
||||
{
|
||||
return opration.Failed(" شناسه ملی باید 11 رقم باشد");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(command.EmployerNationalCode))
|
||||
{
|
||||
if (command.EmployerNationalCode.NationalCodeValid() != "valid")
|
||||
{
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
}
|
||||
}
|
||||
|
||||
string initial = "1300/10/11";
|
||||
var dateOfBirth = command.EmployerDateOfBirth?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
var dateOfIssue = command.EmployerDateOfIssue?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
|
||||
var gender = command.EmployerGender switch
|
||||
{
|
||||
Gender.Male => "مرد",
|
||||
Gender.Female => "زن",
|
||||
Gender.None => null,
|
||||
_ => throw new BadRequestException("جنسیت وارد شده نامعتبر است")
|
||||
};
|
||||
|
||||
|
||||
var legalEmployerData = new Employer(command.EmployerFName, command.CompanyName, command.ContractingPartyId, gender,
|
||||
command.EmployerNationalCode, command.EmployerIdNumber, "ایرانی", command.EmployerFatherName, dateOfBirth,
|
||||
dateOfIssue, command.EmployerPlaceOfIssue, command.RegisterId, command.NationalId, command.EmployerLName, "حقوقی", command.PhoneNumber,
|
||||
command.TelephoneNumber, "true", command.GovernmentSystemInfo.MclUsername, command.GovernmentSystemInfo.MclPassword,
|
||||
command.GovernmentSystemInfo.EServiceUsername, command.GovernmentSystemInfo.EServicePassword,
|
||||
command.GovernmentSystemInfo.TaxUsername, command.GovernmentSystemInfo.TaxPassword, command.GovernmentSystemInfo.SanaUsername, command.GovernmentSystemInfo.SanaPassword);
|
||||
|
||||
await _EmployerRepository.CreateAsync(legalEmployerData);
|
||||
await _EmployerRepository.SaveChangesAsync();
|
||||
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<OperationResult> EditReal(EditRealEmployer command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var employer = _EmployerRepository.Get(command.Id);
|
||||
if (employer == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
if (_EmployerRepository.Exists(x =>
|
||||
(x.FName == command.FName && x.LName == command.LName) && x.Nationalcode == command.NationalCode && x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
if (!string.IsNullOrWhiteSpace(command.NationalCode))
|
||||
{
|
||||
if (command.NationalCode.NationalCodeValid() != "valid")
|
||||
{
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
}
|
||||
}
|
||||
|
||||
if (_EmployerRepository.Exists(x => x.Nationalcode == command.NationalCode && !string.IsNullOrWhiteSpace(command.NationalCode) && x.id != command.Id))
|
||||
{
|
||||
|
||||
return opration.Failed(" کد ملی وارد شده تکراری است");
|
||||
}
|
||||
|
||||
|
||||
|
||||
string initial = "1300/10/11";
|
||||
|
||||
var dateOfBirth = command.DateOfBirth?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
var dateOfIssue = command.DateOfIssue?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
|
||||
var gender = command.Gender switch
|
||||
{
|
||||
Gender.Male => "مرد",
|
||||
Gender.Female => "زن",
|
||||
Gender.None => null,
|
||||
_ => throw new BadRequestException("جنسیت وارد شده نامعتبر است")
|
||||
};
|
||||
|
||||
employer.Edit(command.FName, command.LName, command.ContractingPartyId,
|
||||
gender, command.NationalCode, command.IdNumber, "ایرانی", command.FatherName,
|
||||
dateOfBirth, dateOfIssue, command.PlaceOfIssue, command.PhoneNumber, command.Telephone,
|
||||
command.GovernmentSystemInfo.MclUsername, command.GovernmentSystemInfo.MclPassword, command.GovernmentSystemInfo.EServiceUsername, command.GovernmentSystemInfo.EServicePassword,
|
||||
command.GovernmentSystemInfo.TaxUsername, command.GovernmentSystemInfo.TaxPassword, command.GovernmentSystemInfo.SanaUsername, command.GovernmentSystemInfo.SanaPassword, null);
|
||||
|
||||
await _EmployerRepository.SaveChangesAsync();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<OperationResult> EditLegal(EditLegalEmployer command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var legalEmployer = _EmployerRepository.Get(command.Id);
|
||||
if (legalEmployer == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
if (_EmployerRepository.Exists(x =>
|
||||
x.LName == command.CompanyName && x.NationalId == command.NationalId && !string.IsNullOrWhiteSpace(command.NationalId) && x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(command.NationalId) && command.NationalId.Length != 11)
|
||||
{
|
||||
return opration.Failed(" شناسه ملی باید 11 رقم باشد");
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(command.EmployerNationalCode))
|
||||
{
|
||||
if (command.EmployerNationalCode.NationalCodeValid() != "valid")
|
||||
{
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
}
|
||||
}
|
||||
|
||||
var gender = command.EmployerGender switch
|
||||
{
|
||||
Gender.Male => "مرد",
|
||||
Gender.Female => "زن",
|
||||
Gender.None => null,
|
||||
_ => throw new BadRequestException("جنسیت وارد شده نامعتبر است")
|
||||
};
|
||||
|
||||
string initial = "1300/10/11";
|
||||
var dateOfBirth = command.EmployerDateOfBirth?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
var dateOfIssue = command.EmployerDateOfIssue?.ToGeorgianDateTime() ?? initial.ToGeorgianDateTime();
|
||||
legalEmployer.EditLegal(command.EmployerFName, command.CompanyName, command.ContractingPartyId, gender,
|
||||
command.EmployerNationalCode, command.EmployerIdNumber, "ایرانی", command.EmployerFatherName, dateOfBirth,
|
||||
dateOfIssue, command.EmployerPlaceOfIssue, command.RegisterId, command.NationalId, command.EmployerLName,
|
||||
command.PhoneNumber, command.TelephoneNumber, command.GovernmentSystemInfo.MclUsername, command.GovernmentSystemInfo.MclUsername, command.GovernmentSystemInfo.EServiceUsername, command.GovernmentSystemInfo.EServicePassword,
|
||||
command.GovernmentSystemInfo.TaxUsername, command.GovernmentSystemInfo.TaxPassword, command.GovernmentSystemInfo.SanaUsername, command.GovernmentSystemInfo.SanaPassword, null);
|
||||
|
||||
await _EmployerRepository.SaveChangesAsync();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
//public async Task<List<EmployerSelectListViewModel>> GetSelectList(string search)
|
||||
//{
|
||||
// return await _EmployerRepository.GetSelectList(search);
|
||||
//}
|
||||
|
||||
async Task<OperationResult<string>> IEmployerApplication.RemoveApi(long id)
|
||||
{
|
||||
var employer = _EmployerRepository.Get(id);
|
||||
if (employer == null)
|
||||
throw new NotFoundException("دیتای مورد نظر یافت نشد");
|
||||
|
||||
var workshops = _workshopRepository.GetWorkshopsByEmployerId([id]);
|
||||
|
||||
if (workshops.Any())
|
||||
{
|
||||
return await _EmployerRepository.DeactivateWithSubordinates(id);
|
||||
}
|
||||
|
||||
_EmployerRepository.Remove(id);
|
||||
|
||||
return new OperationResult<string>().Succcedded("Deleted");
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -1,17 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
using Company.Domain.ContarctingPartyAgg;
|
||||
using Company.Domain.empolyerAgg;
|
||||
using CompanyManagment.App.Contracts.Representative;
|
||||
using Company.Domain.InstitutionContractAgg;
|
||||
using CompanyManagment.EFCore.Repository;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
{
|
||||
private readonly IPersonalContractingPartyRepository _personalContractingPartyRepository2;
|
||||
private readonly IPersonalContractingPartyRepository _personalContractingPartyRepository;
|
||||
private readonly IRepresentativeApplication _representativeApplication;
|
||||
private readonly IEmployerRepository _employerRepository;
|
||||
private readonly IInstitutionContractRepository _institutionContractRepository;
|
||||
@@ -26,7 +28,7 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
public PersonalContractingPartyApplication(
|
||||
IPersonalContractingPartyRepository personalContractingPartyRepository, IRepresentativeApplication representativeApplication, IEmployerRepository employerRepository, IInstitutionContractRepository institutionContractRepository)
|
||||
{
|
||||
_personalContractingPartyRepository2 = personalContractingPartyRepository;
|
||||
_personalContractingPartyRepository = personalContractingPartyRepository;
|
||||
_representativeApplication = representativeApplication;
|
||||
_employerRepository = employerRepository;
|
||||
_institutionContractRepository = institutionContractRepository;
|
||||
@@ -36,7 +38,7 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
public OperationResult Create(CreatePersonalContractingParty command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
if (_personalContractingPartyRepository2.Exists(x =>
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.LName && x.Nationalcode == command.Nationalcode && x.SureName == command.SureName ))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
if (command.RepresentativeId < 1)
|
||||
@@ -54,14 +56,14 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
// return opration.Failed("نام خانوادگی وارد شده تکراری است");
|
||||
|
||||
//}
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.Nationalcode == command.Nationalcode && x.LName != command.LName))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.Nationalcode == command.Nationalcode && x.LName != command.LName))
|
||||
{
|
||||
nationalcodeIsOk = false;
|
||||
|
||||
return opration.Failed("کد ملی وارد شده تکراری است");
|
||||
}
|
||||
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.ArchiveCode == command.ArchiveCode))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
|
||||
try
|
||||
@@ -132,8 +134,8 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
command.State,command.City,command.Zone,command.SureName);
|
||||
|
||||
|
||||
_personalContractingPartyRepository2.Create(personalContractingParty);
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.Create(personalContractingParty);
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
|
||||
return opration.Succcedded();
|
||||
|
||||
@@ -152,13 +154,13 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
public OperationResult Edit2(EditPersonalContractingParty command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var personalContractingParty = _personalContractingPartyRepository2.Get(command.Id);
|
||||
var personalContractingParty = _personalContractingPartyRepository.Get(command.Id);
|
||||
if (personalContractingParty == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
personalContractingParty.Edit2(command.Address);
|
||||
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
@@ -166,7 +168,7 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
{
|
||||
|
||||
var opration = new OperationResult();
|
||||
if (_personalContractingPartyRepository2.Exists(x =>
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.LName && x.RegisterId == command.RegisterId && x.SureName == command.SureName))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
if (command.RepresentativeId < 1)
|
||||
@@ -174,23 +176,23 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
|
||||
|
||||
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.LName == command.LName && x.SureName == command.SureName))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.LName == command.LName && x.SureName == command.SureName))
|
||||
{
|
||||
legalNameIsOk = false;
|
||||
return opration.Failed("نام شرکت وارد شده تکراری است");
|
||||
}
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.RegisterId == command.RegisterId && x.LName != command.LName))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.RegisterId == command.RegisterId && x.LName != command.LName))
|
||||
{
|
||||
registerIdIsOk = false;
|
||||
return opration.Failed("شماره ثبت وارد شده تکراری است");
|
||||
|
||||
}
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.NationalId == command.NationalId && x.LName != command.LName))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.NationalId == command.NationalId && x.LName != command.LName))
|
||||
{
|
||||
nationalIdIsOk = false;
|
||||
return opration.Failed("شناسه ملی وارد شده تکراری است");
|
||||
}
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.ArchiveCode == command.ArchiveCode))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
|
||||
|
||||
@@ -204,8 +206,8 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
command.State, command.City, command.Zone,command.SureName);
|
||||
|
||||
|
||||
_personalContractingPartyRepository2.Create(legalContractingParty);
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.Create(legalContractingParty);
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
|
||||
return opration.Succcedded();
|
||||
|
||||
@@ -223,15 +225,15 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
{
|
||||
|
||||
var opration = new OperationResult();
|
||||
var personalContractingParty = _personalContractingPartyRepository2.Get(command.Id);
|
||||
var personalContractingParty = _personalContractingPartyRepository.Get(command.Id);
|
||||
if (personalContractingParty == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
if (command.RepresentativeId < 1)
|
||||
return opration.Failed("لطفا معرف را انتخاب کنید");
|
||||
if (_personalContractingPartyRepository2.Exists(x =>
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.LName && x.Nationalcode == command.Nationalcode && x.SureName == command.SureName && x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.ArchiveCode == command.ArchiveCode && x.id != command.Id))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode && x.id != command.Id))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
try
|
||||
{
|
||||
@@ -300,7 +302,7 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
command.Phone, command.AgentPhone, command.Address, command.RepresentativeId, representative.FullName, command.ArchiveCode,
|
||||
command.State, command.City, command.Zone,command.SureName);
|
||||
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
else
|
||||
@@ -314,16 +316,16 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
{
|
||||
|
||||
var opration = new OperationResult();
|
||||
var legalContractingParty = _personalContractingPartyRepository2.Get(command.Id);
|
||||
var legalContractingParty = _personalContractingPartyRepository.Get(command.Id);
|
||||
if (legalContractingParty == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
if (_personalContractingPartyRepository2.Exists(x =>
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName== command.LName && x.RegisterId == command.RegisterId &&x.SureName == command.SureName &&x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
if (command.RepresentativeId < 1)
|
||||
return opration.Failed("لطفا معرف را انتخاب کنید");
|
||||
if (_personalContractingPartyRepository2.Exists(x => x.ArchiveCode == command.ArchiveCode && x.id != command.Id))
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode && x.id != command.Id))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
var representative = _representativeApplication.GetDetails(command.RepresentativeId);
|
||||
legalContractingParty.EditLegal(command.LName, command.RegisterId,
|
||||
@@ -331,54 +333,54 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
command.Phone, command.AgentPhone, command.Address, command.RepresentativeId, representative.FullName,command.ArchiveCode,
|
||||
command.State, command.City, command.Zone, command.SureName);
|
||||
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public EditPersonalContractingParty GetDetails(long id)
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetDetails(id);
|
||||
return _personalContractingPartyRepository.GetDetails(id);
|
||||
}
|
||||
|
||||
public string IsBlockByEmployerId(long employerId)
|
||||
{
|
||||
return _personalContractingPartyRepository2.IsBlockByEmployerId(employerId);
|
||||
return _personalContractingPartyRepository.IsBlockByEmployerId(employerId);
|
||||
}
|
||||
|
||||
public EditPersonalContractingParty GetDetailsToEdit(long id)
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetDetailsToEdit(id);
|
||||
return _personalContractingPartyRepository.GetDetailsToEdit(id);
|
||||
|
||||
}
|
||||
|
||||
public string GetFullName(long id)
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetFullName(id);
|
||||
return _personalContractingPartyRepository.GetFullName(id);
|
||||
}
|
||||
|
||||
public List<PersonalContractingPartyViewModel> GetPersonalContractingParties()
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetPersonalContractingParties();
|
||||
return _personalContractingPartyRepository.GetPersonalContractingParties();
|
||||
}
|
||||
|
||||
public List<PersonalContractingPartyViewModel> Search(PersonalContractingPartySearchModel searchModel2)
|
||||
{
|
||||
return _personalContractingPartyRepository2.Search(searchModel2);
|
||||
return _personalContractingPartyRepository.Search(searchModel2);
|
||||
}
|
||||
|
||||
public int GetLastArchiveCode()
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetLastArchiveCode();
|
||||
return _personalContractingPartyRepository.GetLastArchiveCode();
|
||||
}
|
||||
#region Mahan
|
||||
public List<string> SearchByName(string name)
|
||||
{
|
||||
return _personalContractingPartyRepository2.SearchByName(name);
|
||||
return _personalContractingPartyRepository.SearchByName(name);
|
||||
}
|
||||
#endregion
|
||||
public ContractingPartyAndStatmentIdViewModel GetContractingpartyIdByAccountId(long accountId)
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetContractingpartyIdByAccountId(accountId);
|
||||
return _personalContractingPartyRepository.GetContractingpartyIdByAccountId(accountId);
|
||||
}
|
||||
|
||||
|
||||
@@ -386,15 +388,15 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
|
||||
public List<PersonalContractingPartyViewModel> GetPersonalContractingPartiesForNationalcode(string searchText)
|
||||
{
|
||||
return _personalContractingPartyRepository2.GetPersonalContractingPartiesForNationalcode(searchText);
|
||||
return _personalContractingPartyRepository.GetPersonalContractingPartiesForNationalcode(searchText);
|
||||
|
||||
}
|
||||
public List<PersonalContractingPartyViewModel> SearchForMain(PersonalContractingPartySearchModel searchModel2)
|
||||
{
|
||||
var result= _personalContractingPartyRepository2.SearchForMain(searchModel2);
|
||||
var result= _personalContractingPartyRepository.SearchForMain(searchModel2);
|
||||
foreach (var item in result)
|
||||
{
|
||||
item.HasInstitutionContract = _personalContractingPartyRepository2.GetHasContract(item.id);
|
||||
item.HasInstitutionContract = _personalContractingPartyRepository.GetHasContract(item.id);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -411,12 +413,12 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
//اونهایی که کارفرما یا قرارداد غیر فعال دارند غیر فعال می شوند
|
||||
if (_employerRepository.Exists(x => x.ContractingPartyId == id)|| _institutionContractRepository.Exists(x => x.ContractingPartyId == id))
|
||||
{
|
||||
opration= _personalContractingPartyRepository2.DeActiveAll(id);
|
||||
opration= _personalContractingPartyRepository.DeActiveAll(id);
|
||||
return opration;
|
||||
}
|
||||
else
|
||||
{
|
||||
opration = _personalContractingPartyRepository2.DeletePersonalContractingParties(id);
|
||||
opration = _personalContractingPartyRepository.DeletePersonalContractingParties(id);
|
||||
}
|
||||
|
||||
return opration;
|
||||
@@ -428,10 +430,10 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
{
|
||||
|
||||
var opration = new OperationResult();
|
||||
var contract = _personalContractingPartyRepository2.Get(id);
|
||||
var contract = _personalContractingPartyRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
return _personalContractingPartyRepository2.ActiveAll(id);
|
||||
return _personalContractingPartyRepository.ActiveAll(id);
|
||||
|
||||
|
||||
//var opration = new OperationResult();
|
||||
@@ -446,44 +448,44 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
public OperationResult DeActive(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var personalContracting = _personalContractingPartyRepository2.Get(id);
|
||||
var personalContracting = _personalContractingPartyRepository.Get(id);
|
||||
if (personalContracting == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
personalContracting.DeActive();
|
||||
|
||||
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
public bool GetHasContract(long id)
|
||||
{
|
||||
|
||||
return _personalContractingPartyRepository2.GetHasContract(id);
|
||||
return _personalContractingPartyRepository.GetHasContract(id);
|
||||
|
||||
}
|
||||
|
||||
public OperationResult Block(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _personalContractingPartyRepository2.Get(id);
|
||||
var contract = _personalContractingPartyRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
contract.Block();
|
||||
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
public OperationResult DisableBlock(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var personalContracting = _personalContractingPartyRepository2.Get(id);
|
||||
var personalContracting = _personalContractingPartyRepository.Get(id);
|
||||
if (personalContracting == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
int blockTimes = personalContracting.BlockTimes + 1;
|
||||
personalContracting.DisableBlock(blockTimes);
|
||||
_personalContractingPartyRepository2.SaveChanges();
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
|
||||
|
||||
|
||||
@@ -499,7 +501,225 @@ public class PersonalContractingPartyApplication : IPersonalContractingPartyApp
|
||||
|
||||
public bool IsBlockCheckByWorkshopId(long workshopId)
|
||||
{
|
||||
return _personalContractingPartyRepository2.IsBlockCheckByWorkshopId(workshopId);
|
||||
return _personalContractingPartyRepository.IsBlockCheckByWorkshopId(workshopId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Api
|
||||
|
||||
|
||||
public async Task<ICollection<ContractingPartyGetListViewModel>> GetList(
|
||||
ContractingPartyGetListSearchModel searchModel)
|
||||
{
|
||||
return await _personalContractingPartyRepository.GetList(searchModel);
|
||||
}
|
||||
|
||||
public async Task<List<ContractingPartySelectListViewModel>> GetSelectList()
|
||||
{
|
||||
return await _personalContractingPartyRepository.GetSelectList();
|
||||
}
|
||||
public async Task<OperationResult> CreateReal(CreateRealContractingParty command)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.LName && x.Nationalcode == command.NationalCode && x.SureName == command.SureName))
|
||||
return operation.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
if (command.RepresentativeId < 1)
|
||||
return operation.Failed("لطفا معرف را انتخاب کنید");
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x => x.Nationalcode == command.NationalCode && x.LName != command.LName))
|
||||
{
|
||||
nationalcodeIsOk = false;
|
||||
|
||||
return operation.Failed("کد ملی وارد شده تکراری است");
|
||||
}
|
||||
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode))
|
||||
return operation.Failed("کد طرف حساب تکراری است");
|
||||
|
||||
if (command.NationalCode.NationalCodeValid() != "valid")
|
||||
{
|
||||
return operation.Failed("کد ملی وارد شده نا معتبر است");
|
||||
}
|
||||
|
||||
var representative = _representativeApplication.GetDetails(command.RepresentativeId);
|
||||
var personalContractingParty = new PersonalContractingParty(command.FName, command.LName,
|
||||
command.NationalCode, command.IdNumber, "*", "*",
|
||||
"حقیقی",
|
||||
command.PhoneNumber, command.AgentPhone, command.Address, command.RepresentativeId, representative.FullName, command.ArchiveCode,
|
||||
command.State, command.City, command.Zone, command.SureName);
|
||||
|
||||
|
||||
await _personalContractingPartyRepository.CreateAsync(personalContractingParty);
|
||||
await _personalContractingPartyRepository.SaveChangesAsync();
|
||||
|
||||
return operation.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateLegal(CreateLegalContractingParty command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.CompanyName && x.RegisterId == command.RegisterId && x.SureName == command.SureName))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
if (command.RepresentativeId < 1)
|
||||
return opration.Failed("لطفا معرف را انتخاب کنید");
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.CompanyName && x.SureName == command.SureName))
|
||||
{
|
||||
legalNameIsOk = false;
|
||||
return opration.Failed("نام شرکت وارد شده تکراری است");
|
||||
}
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.RegisterId == command.RegisterId && x.LName != command.CompanyName))
|
||||
{
|
||||
registerIdIsOk = false;
|
||||
return opration.Failed("شماره ثبت وارد شده تکراری است");
|
||||
|
||||
}
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.NationalId == command.NationalId && x.LName != command.CompanyName))
|
||||
{
|
||||
nationalIdIsOk = false;
|
||||
return opration.Failed("شناسه ملی وارد شده تکراری است");
|
||||
}
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
|
||||
|
||||
|
||||
var representative = _representativeApplication.GetDetails(command.RepresentativeId);
|
||||
var legalContractingParty = new PersonalContractingParty("*", command.CompanyName,
|
||||
"*", "*", command.RegisterId, command.NationalId,
|
||||
"حقوقی",
|
||||
command.PhoneNumber, command.AgentPhone, command.Address, command.RepresentativeId, representative.FullName,
|
||||
command.ArchiveCode,
|
||||
command.State, command.City, command.Zone, command.SureName);
|
||||
|
||||
|
||||
await _personalContractingPartyRepository.CreateAsync(legalContractingParty);
|
||||
await _personalContractingPartyRepository.SaveChangesAsync();
|
||||
|
||||
return opration.Succcedded();
|
||||
|
||||
}
|
||||
|
||||
public async Task<List<GetContractingPartyNationalCodeOrNationalIdViewModel>> GetNationalCodeOrNationalId()
|
||||
{
|
||||
return await _personalContractingPartyRepository.GetNationalCodeOrNationalId();
|
||||
}
|
||||
|
||||
public async Task<OperationResult<string>> Delete(long id)
|
||||
{
|
||||
var operationResult = new OperationResult<string>();
|
||||
|
||||
try
|
||||
{
|
||||
//اگر دارای قرارداد یا دازای کارفرما باشد غیر فعال می شود
|
||||
if (_employerRepository.Exists(x => x.ContractingPartyId == id) || _institutionContractRepository.Exists(x => x.ContractingPartyId == id))
|
||||
{
|
||||
operationResult = await _personalContractingPartyRepository.DeactivateWithSubordinates(id);
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
var entity = _personalContractingPartyRepository.Get(id);
|
||||
_personalContractingPartyRepository.Remove(entity);
|
||||
operationResult.Succcedded("Deleted");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return operationResult.Failed("خطایی رخ داده است");
|
||||
}
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
public OperationResult EditRealApi(EditRealContractingParty command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var personalContractingParty = _personalContractingPartyRepository.Get(command.Id);
|
||||
|
||||
if (personalContractingParty == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
if (command.RepresentativeId < 1)
|
||||
return opration.Failed("لطفا معرف را انتخاب کنید");
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.LName && x.Nationalcode == command.NationalCode && x.SureName == command.SureName && x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode && x.id != command.Id))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
|
||||
if (command.NationalCode.NationalCodeValid() != "valid")
|
||||
{
|
||||
return opration.Failed("کد ملی وارد شده نا معتبر است");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var representative = _representativeApplication.GetDetails(command.RepresentativeId);
|
||||
personalContractingParty.Edit(command.FName, command.LName,
|
||||
command.NationalCode, command.IdNumber,
|
||||
command.PhoneNumber, command.AgentPhone, command.Address, command.RepresentativeId, representative.FullName, command.ArchiveCode,
|
||||
command.State, command.City, command.Zone, command.SureName);
|
||||
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
return opration.Failed("خطایی رخ داده است");
|
||||
}
|
||||
}
|
||||
|
||||
public OperationResult EditLegal(EditLegalContractingParty command)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var legalContractingParty = _personalContractingPartyRepository.Get(command.Id);
|
||||
if (legalContractingParty == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
if (_personalContractingPartyRepository.Exists(x =>
|
||||
x.LName == command.CompanyName && x.RegisterId == command.RegisterId && x.SureName == command.SureName && x.id != command.Id))
|
||||
return opration.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
if (command.RepresentativeId < 1)
|
||||
return opration.Failed("لطفا معرف را انتخاب کنید");
|
||||
if (_personalContractingPartyRepository.Exists(x => x.ArchiveCode == command.ArchiveCode && x.id != command.Id))
|
||||
return opration.Failed("کد طرف حساب تکراری است");
|
||||
var representative = _representativeApplication.GetDetails(command.RepresentativeId);
|
||||
legalContractingParty.EditLegal(command.CompanyName, command.RegisterId,
|
||||
command.NationalId,
|
||||
command.PhoneNumber, command.AgentPhone, command.Address, command.RepresentativeId, representative.FullName, command.ArchiveCode,
|
||||
command.State, command.City, command.Zone, command.SureName);
|
||||
|
||||
_personalContractingPartyRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<GetRealContractingPartyDetailsViewModel> GetRealDetails(long id)
|
||||
{
|
||||
return await _personalContractingPartyRepository.GetRealDetails(id);
|
||||
}
|
||||
|
||||
public async Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id)
|
||||
{
|
||||
return await _personalContractingPartyRepository.GetLegalDetails(id);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -67,7 +67,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
return op.Failed("شماره همراه نا معتبر است");
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -141,6 +141,8 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
result.FName = createTemp.FName;
|
||||
result.LName = createTemp.LName;
|
||||
result.DateOfBirthFa = dateOfBirth;
|
||||
result.FatherName = createTemp.FatherName;
|
||||
result.IdNumberSerial = createTemp.IdNumberSerial;
|
||||
result.IdNumber = idNumber;
|
||||
|
||||
return op.Succcedded(result);
|
||||
@@ -188,7 +190,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<OperationResult> CreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command)
|
||||
public async Task<OperationResult> CreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command, long contractingPartyTempId)
|
||||
{
|
||||
var op = new OperationResult();
|
||||
var updateWorkshopList = command.Where(x => x.Id > 0).ToList();
|
||||
@@ -196,10 +198,17 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
|
||||
if (updateWorkshopList.Count == 0 && createNewWorkshopList.Count == 0)
|
||||
return op.Failed("هیچ مجموعه ای ایجاد نشده است");
|
||||
var oldWorkshops = await _workshopTempRepository.GetWorkshopTemp(contractingPartyTempId);
|
||||
|
||||
#region Update
|
||||
if (updateWorkshopList.Count > 0)
|
||||
{
|
||||
var updateListIds = updateWorkshopList.Select(x => x.Id).ToList();
|
||||
var oldWorkshopsIds = oldWorkshops.Select(x => x.Id).ToList();
|
||||
var exceptWorkshops = oldWorkshopsIds.Except(updateListIds).ToList();
|
||||
if (exceptWorkshops.Any())
|
||||
await _workshopTempRepository.RemoveWorkshopTemps(exceptWorkshops);
|
||||
|
||||
|
||||
foreach (var workshop in updateWorkshopList)
|
||||
{
|
||||
@@ -212,6 +221,7 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
workshop.RollCall == false && workshop.Insurance == false)
|
||||
op.Failed($"برای مجموعه {workshop.WorkshopName} هیچ سرویسی انتخاب نشده است");
|
||||
var existWorkshops = _workshopTempRepository.Get(workshop.Id);
|
||||
|
||||
if (existWorkshops != null)
|
||||
{
|
||||
if (workshop.ContractAndCheckout)
|
||||
@@ -256,6 +266,8 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
if (workshop.CustomizeCheckout)
|
||||
await _workshopServicesTempRepository.CreateAsync(
|
||||
new WorkshopServicesTemp("CustomizeCheckout", workshop.CountPerson, workshop.Id));
|
||||
|
||||
await _workshopServicesTempRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -324,6 +336,8 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
if (workshop.CustomizeCheckout)
|
||||
await _workshopServicesTempRepository.CreateAsync(
|
||||
new WorkshopServicesTemp("CustomizeCheckout", workshop.CountPerson, createNewWorkshopTemp.id));
|
||||
|
||||
await _workshopServicesTempRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -352,8 +366,9 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId, string periodModel = "12", string paymentModel = "OneTime")
|
||||
public async Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId, string periodModel = "12", string paymentModel = "OneTime", string contractStartType = "currentMonth")
|
||||
{
|
||||
|
||||
//دریافت کارگاه ها
|
||||
var workshops = await _workshopTempRepository.GetWorkshopTemp(contractingPartyTempId);
|
||||
|
||||
@@ -380,9 +395,10 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
_ => 12,
|
||||
};
|
||||
//رند کردن مبالغ کارگاه ها
|
||||
var roundAmount = (int)(totalPayment1MonthDouble / 1000000) * 1000000;
|
||||
var roundAmount = (((Convert.ToInt64(totalPayment1MonthDouble))) / 1000000) * 1000000;
|
||||
double roundAmount2 = roundAmount;
|
||||
//بدست آوردن جمع کل مبالغ کارگاه بر اساس مدت قراداد
|
||||
result.SumOfWorkshopsPaymentDouble = roundAmount * months;
|
||||
result.SumOfWorkshopsPaymentDouble = months * roundAmount2;
|
||||
result.SumOfWorkshopsPaymentPaymentStr = result.SumOfWorkshopsPaymentDouble.ToMoney();
|
||||
|
||||
|
||||
@@ -394,31 +410,112 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
//مالیات
|
||||
result.ValueAddedTaxDouble = tenPercent;
|
||||
result.ValueAddedTaxSt = tenPercent.ToMoney();
|
||||
if (paymentModel == "OneTime")//تخفیف 10 درصدی درصورت پرداخت یکجا
|
||||
//پرداخت یکجا
|
||||
#region OneTimePaymentResult
|
||||
|
||||
double discountOneTimePeyment = result.SumOfWorkshopsPaymentDouble - tenPercent;
|
||||
|
||||
|
||||
//مبلغ بدون مالیات و با تخفیف
|
||||
result.OneTimeWithoutTaxPaymentDouble = discountOneTimePeyment;
|
||||
result.OneTimeWithoutTaxPaymentStr = discountOneTimePeyment.ToMoney();
|
||||
|
||||
//مبلغ با مالیات
|
||||
result.OneTimeTotalPaymentDouble = discountOneTimePeyment + tenPercent;
|
||||
result.OneTimeTotalPaymentStr = result.OneTimeTotalPaymentDouble.ToMoney();
|
||||
|
||||
#endregion
|
||||
|
||||
//پرداخت ماهیانه
|
||||
#region MonthlyPaymentResult
|
||||
|
||||
//مبلغ بدون مالیات
|
||||
result.MonthlyWithoutTaxPaymentDouble = result.SumOfWorkshopsPaymentDouble;
|
||||
result.MonthlyWithoutTaxPaymentStr = result.SumOfWorkshopsPaymentDouble.ToMoney();
|
||||
|
||||
// مبلغ با مالیات
|
||||
result.MonthlyTotalPaymentDouble = result.SumOfWorkshopsPaymentDouble + tenPercent;
|
||||
result.MonthlyTotalPaymentStr = result.MonthlyTotalPaymentDouble.ToMoney();
|
||||
var installmentList = new List<MonthlyInstallment>();
|
||||
|
||||
var startDate = (DateTime.Now).ToFarsi();
|
||||
result.ContractStartCurrentMonthFa = $"{startDate.Substring(0, 8)}01";
|
||||
result.ContractStartCurrentMonthGr = result.ContractStartCurrentMonthFa.ToGeorgianDateTime();
|
||||
startDate = result.ContractStartCurrentMonthFa;
|
||||
|
||||
result.ContractStartNextMonthGr = ((startDate.FindeEndOfMonth()).ToGeorgianDateTime()).AddDays(1);
|
||||
result.ContractStartNextMonthFa = result.ContractStartNextMonthGr.ToFarsi();
|
||||
|
||||
if (contractStartType == "nextMonth")
|
||||
startDate = result.ContractStartNextMonthFa;
|
||||
|
||||
|
||||
|
||||
var findeEnd = Tools.FindEndOfContract(startDate, periodModel);
|
||||
var contractEndDate = findeEnd.endDateGr;
|
||||
result.ContractEndGr = contractEndDate;
|
||||
result.ContractEndFa = contractEndDate.ToFarsi();
|
||||
|
||||
if (periodModel == "1")
|
||||
{
|
||||
|
||||
double discountOneTimePeyment = result.SumOfWorkshopsPaymentDouble - tenPercent;
|
||||
|
||||
installmentList.Add(new MonthlyInstallment()
|
||||
{
|
||||
InstallmentAmountStr = result.MonthlyTotalPaymentStr,
|
||||
InstallmentCounter = "سررسید پرداخت اول",
|
||||
InstalmentDate = (DateTime.Now).ToFarsi()
|
||||
|
||||
//مبلغ بدون مالیات و با تخفیف
|
||||
result.WithoutTaxPaymentDouble = discountOneTimePeyment;
|
||||
result.WithoutTaxPaymentStr = discountOneTimePeyment.ToMoney();
|
||||
|
||||
//مبلغ با مالیات
|
||||
result.TotalPaymentDouble = discountOneTimePeyment + tenPercent;
|
||||
result.TotalPaymentStr = result.TotalPaymentDouble.ToMoney();
|
||||
});
|
||||
result.MonthlyInstallments = installmentList;
|
||||
}
|
||||
else
|
||||
{
|
||||
//مبلغ بدون مالیات
|
||||
result.WithoutTaxPaymentDouble = result.SumOfWorkshopsPaymentDouble;
|
||||
result.WithoutTaxPaymentStr = result.SumOfWorkshopsPaymentDouble.ToMoney();
|
||||
int instalmentCount = Convert.ToInt32(periodModel);
|
||||
var instalmentAmount = result.MonthlyTotalPaymentDouble / instalmentCount;
|
||||
var findEndOfMonth = startDate.FindeEndOfMonth();
|
||||
for (int i = 1; i <= instalmentCount; i++)
|
||||
{
|
||||
if (i == 1)
|
||||
{
|
||||
startDate = (DateTime.Now).ToFarsi();
|
||||
|
||||
}
|
||||
else if (i > 1)
|
||||
{
|
||||
var currentMonthStart = ((findEndOfMonth.ToGeorgianDateTime()).AddDays(1)).ToFarsi();
|
||||
startDate = currentMonthStart.FindeEndOfMonth();
|
||||
findEndOfMonth = startDate;
|
||||
}
|
||||
|
||||
installmentList.Add(new MonthlyInstallment()
|
||||
{
|
||||
InstallmentAmountStr = instalmentAmount.ToMoney(),
|
||||
InstallmentCounter = i switch
|
||||
{
|
||||
1 => "سررسید پرداخت اول",
|
||||
2 => "سررسید پرداخت دوم",
|
||||
3 => "سررسید پرداخت سوم",
|
||||
4 => "سررسید پرداخت چهارم",
|
||||
5 => "سررسید پرداخت پنجم",
|
||||
6 => "سررسید پرداخت ششم",
|
||||
7 => "سررسید پرداخت هفتم",
|
||||
8 => "سررسید پرداخت هشتم",
|
||||
9 => "سررسید پرداخت نهم",
|
||||
10 => "سررسید پرداخت دهم",
|
||||
11 => "سررسید پرداخت یازدهم",
|
||||
12 => "سررسید پرداخت دوازدهم",
|
||||
_ => "سررسید پرداخت دوازدهم",
|
||||
},
|
||||
InstalmentDate = startDate
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// مبلغ با مالیات
|
||||
result.TotalPaymentDouble = result.SumOfWorkshopsPaymentDouble + tenPercent;
|
||||
result.TotalPaymentStr = result.TotalPaymentDouble.ToMoney();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
result.MonthlyInstallments = installmentList;
|
||||
result.ContractingPartTempId = contractingPartyTempId;
|
||||
|
||||
return result;
|
||||
@@ -430,19 +527,21 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<OperationResult> CreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax)
|
||||
public async Task<OperationResult> CreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax, DateTime contractStart)
|
||||
{
|
||||
|
||||
var op = new OperationResult();
|
||||
var institutionContractTemp = await
|
||||
_institutionContractTempRepository.GetInstitutionContractTemp(0, contractingPartyTempId);
|
||||
|
||||
var contractStartDate = contractStart;
|
||||
string contractStartFa = contractStart.ToFarsi();
|
||||
var findeEnd = Tools.FindEndOfContract(contractStartFa, periodModel);
|
||||
var contractEndDate = findeEnd.endDateGr;
|
||||
if (institutionContractTemp == null)
|
||||
{
|
||||
var periodModelInt = Convert.ToInt32(periodModel);
|
||||
var contractstart = DateTime.Now;
|
||||
var contractEnd = DateTime.Now.AddMonths(periodModelInt);
|
||||
var create = new InstitutionContractTemp(contractingPartyTempId,paymentModel,periodModel,totalPayment,contractstart,contractEnd,"official", valueAddedTax,"", "BeforeSendVerifyCode", 0,null,null);
|
||||
|
||||
var create = new InstitutionContractTemp(contractingPartyTempId, paymentModel, periodModel, totalPayment, contractStartDate, contractEndDate, "official", valueAddedTax, "", "BeforeSendVerifyCode", 0, null, null);
|
||||
_institutionContractTempRepository.Create(create);
|
||||
_institutionContractTempRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
@@ -451,20 +550,20 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
{
|
||||
if (institutionContractTemp.VerifyCodeEndTime != null)
|
||||
{
|
||||
var spaning = (institutionContractTemp.VerifyCodeEndTime.Value - DateTime.Now);
|
||||
var spaning = (DateTime.Now - institutionContractTemp.VerifyCodeEndTime.Value);
|
||||
if (institutionContractTemp.RegistrationStatus == "VerifyCodeSent" && spaning > new TimeSpan(0, 0, 0) && spaning < new TimeSpan(0, 1, 0))
|
||||
return op.Failed("شما به تازگی پیامک دریافت نموده اید دو دقیقه صبر کنید و دوباره تلاش کنید");
|
||||
}
|
||||
|
||||
|
||||
if (institutionContractTemp.RegistrationStatus == "Completed")
|
||||
return op.Failed("شما قبلا ثبت نام خود را تکمیل نموده اید");
|
||||
|
||||
|
||||
|
||||
var periodModelInt = Convert.ToInt32(periodModel);
|
||||
var contractstart = DateTime.Now;
|
||||
var contractEnd = DateTime.Now.AddMonths(periodModelInt);
|
||||
var update = _institutionContractTempRepository.Get(institutionContractTemp.Id);
|
||||
update.Edit(contractingPartyTempId, paymentModel, periodModel, totalPayment, contractstart, contractEnd, "official", valueAddedTax, "", "BeforeSendVerifyCode", 0, null, null);
|
||||
update.Edit(contractingPartyTempId, paymentModel, periodModel, totalPayment, contractStartDate, contractEndDate, "official", valueAddedTax, "", "BeforeSendVerifyCode", 0, null, null);
|
||||
_institutionContractTempRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
@@ -483,14 +582,14 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
{
|
||||
|
||||
var op = new OperationResult();
|
||||
var institutionContractTemp = await
|
||||
var institutionContractTemp = await
|
||||
_institutionContractTempRepository.GetInstitutionContractTemp(0, contractingPartyTempId);
|
||||
if (institutionContractTemp == null)
|
||||
return op.Failed("خظا");
|
||||
return op.Failed("خطا");
|
||||
|
||||
var update = _institutionContractTempRepository.Get(institutionContractTemp.Id);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (institutionContractTemp.RegistrationStatus == "BeforeSendVerifyCode")
|
||||
@@ -516,26 +615,29 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
return op.Succcedded(1, "کد برای شما پیامک شد");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (institutionContractTemp.RegistrationStatus == "VerifyCodeSent")
|
||||
|
||||
{
|
||||
var spaning = (institutionContractTemp.VerifyCodeEndTime.Value - DateTime.Now);
|
||||
if ((spaning > new TimeSpan(0, 0, 0) && spaning < new TimeSpan(0, 1, 0)))
|
||||
|
||||
if (DateTime.Now < institutionContractTemp.VerifyCodeEndTime.Value)
|
||||
return op.Failed("کد دریافت شده را وارد کنید");
|
||||
var spaning = (DateTime.Now - institutionContractTemp.VerifyCodeEndTime.Value);
|
||||
if ((spaning > new TimeSpan(0, 0, 0) && spaning < new TimeSpan(0, 1, 0)))
|
||||
return op.Failed("شما به تازگی پیامک دریافت نموده اید دو دقیقه صبر کنید و دوباره تلاش کنید");
|
||||
|
||||
if ((spaning > new TimeSpan(0, 0, 0) && spaning > new TimeSpan(0, 1, 0)))
|
||||
if ((spaning > new TimeSpan(0, 1, 0)))
|
||||
{
|
||||
//ساخت کد شش رقمی
|
||||
Random generator = new Random();
|
||||
String code = generator.Next(1, 1000000).ToString("D6");
|
||||
//ارسال اس ام اس
|
||||
var getContractingPaty = _contractingPartyTempRepository.GetByContractingPartyTempId(contractingPartyTempId);
|
||||
var sendResult =await _smsService.SendVerifyCodeToClient(getContractingPaty.Phone, code);
|
||||
var sendResult = await _smsService.SendVerifyCodeToClient(getContractingPaty.Phone, code);
|
||||
|
||||
if(!sendResult.IsSuccedded)
|
||||
if (!sendResult.IsSuccedded)
|
||||
return op.Failed($"{sendResult.Message}");
|
||||
|
||||
|
||||
@@ -544,16 +646,16 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
//ذخیره تاریخ ارسال و مهلت پایان
|
||||
//ذخیره آیدی پیامک
|
||||
//تغییر وضعیت به ارسال شده
|
||||
|
||||
|
||||
if (update != null)
|
||||
{
|
||||
update.Update(code, "VerifyCodeSent",sendResult.MessageId, DateTime.Now, DateTime.Now.AddMinutes(2));
|
||||
update.Update(code, "VerifyCodeSent", sendResult.MessageId, DateTime.Now, DateTime.Now.AddMinutes(2));
|
||||
_institutionContractTempRepository.SaveChanges();
|
||||
return op.Succcedded(1, "کد برای شما پیامک شد");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -580,25 +682,25 @@ public class TemporaryClientRegistrationApplication : ITemporaryClientRegistrati
|
||||
_institutionContractTempRepository.GetInstitutionContractTemp(0, contractingPartyTempId);
|
||||
if (institutionContractTemp == null)
|
||||
return op.Failed("خظا");
|
||||
if(institutionContractTemp.RegistrationStatus != "VerifyCodeSent")
|
||||
if (institutionContractTemp.RegistrationStatus != "VerifyCodeSent")
|
||||
return op.Failed("خطا");
|
||||
|
||||
if(institutionContractTemp.VerifyCodeEndTime < DateTime.Now)
|
||||
if (institutionContractTemp.VerifyCodeEndTime < DateTime.Now)
|
||||
return op.Failed("کد شما منقضی شده است");
|
||||
|
||||
if(institutionContractTemp.SendVerifyCodeTime < DateTime.Now && institutionContractTemp.VerifyCodeEndTime >= DateTime.Now)
|
||||
if (institutionContractTemp.SendVerifyCodeTime < DateTime.Now && institutionContractTemp.VerifyCodeEndTime >= DateTime.Now)
|
||||
{
|
||||
if (institutionContractTemp.VerifyCode == verifyCode)
|
||||
{
|
||||
|
||||
|
||||
|
||||
return op.Succcedded();
|
||||
}
|
||||
else
|
||||
{
|
||||
return op.Failed("کد وارد شده صحیح نیست");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ using Company.Domain.CheckoutAgg;
|
||||
using Company.Domain.ClassifiedSalaryAgg;
|
||||
using Company.Domain.ClientEmployeeWorkshopAgg;
|
||||
using Company.Domain.Contact2Agg;
|
||||
using Company.Domain.ContactUsAgg;
|
||||
using Company.Domain.ContarctingPartyAgg;
|
||||
using Company.Domain.ContractAgg;
|
||||
using Company.Domain.ContractingPartyAccountAgg;
|
||||
@@ -175,6 +176,8 @@ public class CompanyContext : DbContext
|
||||
|
||||
public DbSet<EmployeeClientTemp> EmployeeClientTemps { get; set; }
|
||||
public DbSet<LeftWorkTemp> LeftWorkTemps { get; set; }
|
||||
public DbSet<ContactUs> ContactUs { get; set; }
|
||||
|
||||
|
||||
public DbSet<EmployeeAuthorizeTemp> EmployeeAuthorizeTemps { get; set; }
|
||||
public DbSet<AdminMonthlyOverview> AdminMonthlyOverviews { get; set; }
|
||||
|
||||
20
CompanyManagment.EFCore/Mapping/ContactUsMapping.cs
Normal file
20
CompanyManagment.EFCore/Mapping/ContactUsMapping.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Company.Domain.ContactUsAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping;
|
||||
|
||||
public class ContactUsMapping:IEntityTypeConfiguration<ContactUs>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ContactUs> builder)
|
||||
{
|
||||
builder.HasKey(x => x.id);
|
||||
builder.Property(x => x.FullName).HasMaxLength(200);
|
||||
builder.Property(x => x.Title).HasMaxLength(200);
|
||||
builder.Property(x => x.Email).HasMaxLength(200);
|
||||
builder.Property(x => x.FirstName).HasMaxLength(100);
|
||||
builder.Property(x => x.LastName).HasMaxLength(100);
|
||||
builder.Property(x => x.Message).HasMaxLength(500);
|
||||
builder.Property(x => x.PhoneNumber).HasMaxLength(20);
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class PersonalContractingpartyMapping : IEntityTypeConfiguration<Personal
|
||||
builder.Property(x => x.IdNumberSerial).HasMaxLength(15);
|
||||
builder.Property(x => x.FatherName).HasMaxLength(20);
|
||||
builder.Property(x => x.DateOfBirth).IsRequired(false);
|
||||
builder.Property(x => x.Gender).HasConversion(
|
||||
builder.Property(x => x.Gender).HasConversion(
|
||||
v => v.ToString(),
|
||||
v => string.IsNullOrWhiteSpace(v) ? Gender.None : (Gender)Enum.Parse(typeof(Gender), v)).HasMaxLength(6);
|
||||
|
||||
|
||||
9450
CompanyManagment.EFCore/Migrations/20250423184716_add contact us .Designer.cs
generated
Normal file
9450
CompanyManagment.EFCore/Migrations/20250423184716_add contact us .Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addcontactus : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ContactUs",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
FirstName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
LastName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
Email = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
PhoneNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
|
||||
Title = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
Message = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
FullName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ContactUs", x => x.id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ContactUs");
|
||||
}
|
||||
}
|
||||
}
|
||||
9410
CompanyManagment.EFCore/Migrations/20250427155240_add salaryAid calculation date.Designer.cs
generated
Normal file
9410
CompanyManagment.EFCore/Migrations/20250427155240_add salaryAid calculation date.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addsalaryAidcalculationdate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addsalaryAidcalculationdatetocustomizecheckouts : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -560,6 +560,50 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.ToTable("TextManager_Contact", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ContactUsAgg.ContactUs", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("FirstName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("ContactUs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
|
||||
14
CompanyManagment.EFCore/Repository/ContactUsRepository.cs
Normal file
14
CompanyManagment.EFCore/Repository/ContactUsRepository.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ContactUsAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ContactUsRepository:RepositoryBase<long,ContactUs>,IContactUsRepository
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
public ContactUsRepository(CompanyContext companyContext) : base(companyContext)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
}
|
||||
}
|
||||
@@ -8,364 +8,351 @@ using CompanyManagment.App.Contracts.CustomizeWorkshopSettings.ValueObjectsViewM
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext, IAuthHelper authHelper, IEmployeeRepository employeeRepository)
|
||||
: RepositoryBase<long, CustomizeWorkshopSettings>(companyContext), ICustomizeWorkshopSettingsRepository
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
private readonly CompanyContext _companyContext = companyContext;
|
||||
private readonly IAuthHelper _authHelper = authHelper;
|
||||
private readonly IEmployeeRepository _employeeRepository = employeeRepository;
|
||||
|
||||
public CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopId(long workshopId, AuthViewModel auth)
|
||||
public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext, IAuthHelper authHelper, IEmployeeRepository employeeRepository)
|
||||
: RepositoryBase<long, CustomizeWorkshopSettings>(companyContext), ICustomizeWorkshopSettingsRepository
|
||||
{
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection).AsSplitQuery()
|
||||
.FirstOrDefault();
|
||||
if (entity == null)
|
||||
return new();
|
||||
private readonly CompanyContext _companyContext = companyContext;
|
||||
private readonly IAuthHelper _authHelper = authHelper;
|
||||
private readonly IEmployeeRepository _employeeRepository = employeeRepository;
|
||||
|
||||
var employeeIds = entity.CustomizeWorkshopGroupSettingsCollection
|
||||
.SelectMany(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.Select(y => y.EmployeeId)
|
||||
.ToList();
|
||||
var employees = _employeeRepository.GetBy(employeeIds);
|
||||
return new CustomizeWorkshopSettingsViewModel()
|
||||
public CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopId(long workshopId, AuthViewModel auth)
|
||||
{
|
||||
Id = entity.id,
|
||||
Name = auth.WorkshopList.FirstOrDefault(w => w.Id == entity.WorkshopId)?.Name,
|
||||
GroupSettings = entity.CustomizeWorkshopGroupSettingsCollection.Where(x => !x.MainGroup).Select(x =>
|
||||
new CustomizeWorkshopGroupSettingsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
GroupName = x.GroupName,
|
||||
RollCallWorkshopEmployeesSettings = x.CustomizeWorkshopEmployeeSettingsCollection.Select(y =>
|
||||
{
|
||||
var employee = employees.First(e => e.Id == y.EmployeeId);
|
||||
return new CustomizeWorkshopEmployeeSettingsViewModel()
|
||||
{
|
||||
Id = y.id,
|
||||
EmployeeId = y.EmployeeId,
|
||||
IsSettingChanged = y.IsSettingChanged,
|
||||
IsShiftChanged = y.IsShiftChanged,
|
||||
Name = $"{employee}",
|
||||
RollCallWorkshopShifts = y.CustomizeWorkshopEmployeeSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
Salary = y.Salary,
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection).AsSplitQuery()
|
||||
.FirstOrDefault();
|
||||
if (entity == null)
|
||||
return new();
|
||||
|
||||
};
|
||||
}).ToList(),
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
IrregularShift = x.IrregularShift,
|
||||
Salary = x.Salary,
|
||||
RollCallWorkshopShifts = x.CustomizeWorkshopGroupSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
|
||||
}).ToList(),
|
||||
MainGroup = x.MainGroup,
|
||||
CustomizeRotatingShiftsViewModels = x.CustomizeRotatingShifts.
|
||||
Select(r=>new CustomizeRotatingShiftsViewModel(){StartTime = r.StartTime.ToString("HH:mm"), EndTime = r.EndTime.ToString("HH:mm")}).ToList()
|
||||
}).ToList(),
|
||||
|
||||
};
|
||||
}
|
||||
public CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopIdForAdmin(long workshopId)
|
||||
{
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection).AsSplitQuery()
|
||||
.FirstOrDefault();
|
||||
if (entity == null)
|
||||
return new();
|
||||
|
||||
return new CustomizeWorkshopSettingsViewModel()
|
||||
{
|
||||
Id = entity.id,
|
||||
Offset = entity.EndTimeOffSet,
|
||||
GroupSettings = entity.CustomizeWorkshopGroupSettingsCollection.Where(x => !x.MainGroup).Select(x =>
|
||||
new CustomizeWorkshopGroupSettingsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
GroupName = x.GroupName,
|
||||
RollCallWorkshopEmployeesSettings = x.CustomizeWorkshopEmployeeSettingsCollection.Select(y =>
|
||||
{
|
||||
var employee = _employeeRepository.Get(y.EmployeeId);
|
||||
return new CustomizeWorkshopEmployeeSettingsViewModel()
|
||||
{
|
||||
Id = y.id,
|
||||
EmployeeId = y.EmployeeId,
|
||||
IsSettingChanged = y.IsSettingChanged,
|
||||
IsShiftChanged = y.IsShiftChanged,
|
||||
Name = $"{employee?.FName} {employee?.LName}",
|
||||
RollCallWorkshopShifts = y.CustomizeWorkshopEmployeeSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
Salary = y.Salary,
|
||||
CustomizeRotatingShiftsViewModels = y.CustomizeRotatingShifts.Select(r => new CustomizeRotatingShiftsViewModel
|
||||
{
|
||||
StartTime = r.StartTime.ToString("HH:mm"),
|
||||
EndTime = r.EndTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
LeavePermittedDays = y.LeavePermittedDays,
|
||||
IrregularShift = y.IrregularShift,
|
||||
WorkshopShiftStatus = y.WorkshopShiftStatus
|
||||
};
|
||||
}).ToList(),
|
||||
Salary = x.Salary,
|
||||
RollCallWorkshopShifts = x.CustomizeWorkshopGroupSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
|
||||
}).ToList(),
|
||||
MainGroup = x.MainGroup,
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
CustomizeRotatingShiftsViewModels = x.CustomizeRotatingShifts.Select(r => new CustomizeRotatingShiftsViewModel
|
||||
{
|
||||
StartTime = r.StartTime.ToString("HH:mm"),
|
||||
EndTime = r.EndTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
IrregularShift = x.IrregularShift
|
||||
|
||||
|
||||
|
||||
}).ToList(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public EditCustomizeWorkshopSettings GetWorkshopSettingsDetails(long workshopId)
|
||||
{
|
||||
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
if (entity == null)
|
||||
return new();
|
||||
var viewModel = new EditCustomizeWorkshopSettings()
|
||||
{
|
||||
FridayWork = entity.FridayWork,
|
||||
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||
LateToWork = new()
|
||||
var employeeIds = entity.CustomizeWorkshopGroupSettingsCollection
|
||||
.SelectMany(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.Select(y => y.EmployeeId)
|
||||
.ToList();
|
||||
var employees = _employeeRepository.GetBy(employeeIds);
|
||||
return new CustomizeWorkshopSettingsViewModel()
|
||||
{
|
||||
LateToWorkTimeFinesVewModels = entity.LateToWork.LateToWorkTimeFines.Select(x =>
|
||||
new LateToWorkTimeFineVewModel() { FineMoney = x.FineMoney, Minute = x.Minute }).ToList(),
|
||||
Value = entity.LateToWork.Value,
|
||||
LateToWorkType = entity.LateToWork.LateToWorkType
|
||||
},
|
||||
HolidayWork = entity.HolidayWork,
|
||||
FineAbsenceDeduction = new()
|
||||
{
|
||||
Value = entity.FineAbsenceDeduction.Value,
|
||||
FineAbsenceDayOfWeekViewModels = entity.FineAbsenceDeduction.FineAbsenceDayOfWeekCollection
|
||||
.Select(x => new FineAbsenceDayOfWeekViewModel() { DayOfWeek = x.DayOfWeek }).ToList(),
|
||||
FineAbsenceDeductionType = entity.FineAbsenceDeduction.FineAbsenceDeductionType
|
||||
},
|
||||
EarlyExit = new()
|
||||
{
|
||||
EarlyExitTimeFinesViewModels = entity.EarlyExit.EarlyExitTimeFines.Select(x =>
|
||||
new EarlyExitTimeFineViewModel() { FineMoney = x.FineMoney, Minute = x.Minute }).ToList(),
|
||||
Value = entity.EarlyExit.Value,
|
||||
EarlyExitType = entity.EarlyExit.EarlyExitType
|
||||
},
|
||||
BonusesPay = new()
|
||||
{
|
||||
Value = entity.BonusesPay.Value,
|
||||
BonusesPayType = entity.BonusesPay.BonusesPayType,
|
||||
PaymentType = entity.BonusesPay.PaymentType
|
||||
},
|
||||
ShiftPay = new()
|
||||
{
|
||||
Value = entity.ShiftPay.Value,
|
||||
ShiftPayType = entity.ShiftPay.ShiftPayType,
|
||||
ShiftType = entity.ShiftPay.ShiftType
|
||||
},
|
||||
InsuranceDeduction = new()
|
||||
{
|
||||
Value = entity.InsuranceDeduction.Value,
|
||||
InsuranceDeductionType = entity.InsuranceDeduction.InsuranceDeductionType
|
||||
},
|
||||
OverTimePay = new()
|
||||
{ OverTimePayType = entity.OverTimePay.OverTimePayType, Value = entity.OverTimePay.Value },
|
||||
BaseYearsPay = new()
|
||||
{
|
||||
BaseYearsPayType = entity.BaseYearsPay.BaseYearsPayType,
|
||||
Value = entity.BaseYearsPay.Value,
|
||||
PaymentType = entity.BaseYearsPay.PaymentType
|
||||
},
|
||||
NightWorkPay = new()
|
||||
{ NightWorkingType = entity.NightWorkPay.NightWorkingType, Value = entity.NightWorkPay.Value },
|
||||
LeavePay = new()
|
||||
{
|
||||
Value = entity.LeavePay.Value,
|
||||
LeavePayType = entity.LeavePay.LeavePayType
|
||||
},
|
||||
MarriedAllowance = new()
|
||||
{
|
||||
Value = entity.MarriedAllowance.Value,
|
||||
MarriedAllowanceType = entity.MarriedAllowance.MarriedAllowanceType
|
||||
},
|
||||
FamilyAllowance = new()
|
||||
{
|
||||
FamilyAllowanceType = entity.FamilyAllowance.FamilyAllowanceType,
|
||||
Value = entity.FamilyAllowance.Value
|
||||
},
|
||||
Currency = entity.Currency,
|
||||
MaxMonthDays = entity.MaxMonthDays,
|
||||
Id = entity.id,
|
||||
ShiftsList = entity.CustomizeWorkshopSettingsShifts.Select(x => new CustomizeWorkshopShiftViewModel()
|
||||
{ EndTime = x.EndTime.ToString("HH:mm"), Placement = x.Placement, StartTime = x.StartTime.ToString("HH:mm") }).ToList(),
|
||||
BonusesPaysInEndOfMonth = entity.BonusesPaysInEndOfMonth,
|
||||
LeavePermittedDays = entity.LeavePermittedDays,
|
||||
BaseYearsPayInEndOfYear = entity.BaseYearsPayInEndOfYear,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus
|
||||
|
||||
};
|
||||
return viewModel;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public EditCustomizeWorkshopSettings GetSimpleWorkshopSettings(long workshopId)
|
||||
{
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
if (entity == null)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
||||
return new()
|
||||
{
|
||||
ShiftsList = entity.CustomizeWorkshopSettingsShifts.Select(x => new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = x.EndTime.ToString("HH:mm"),
|
||||
StartTime = x.StartTime.ToString("HH:mm"),
|
||||
Placement = x.Placement
|
||||
}).ToList(),
|
||||
Id = entity.id,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
||||
FridayWork = entity.FridayWork,
|
||||
HolidayWork = entity.HolidayWork
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public List<ChangedGroupedViewModel> GetShiftChangesGroupAndEmployees(long customizeWorkshopSettingsId)
|
||||
{
|
||||
|
||||
|
||||
var result = from groupSetting in _companyContext.CustomizeWorkshopGroupSettings.AsSplitQuery()
|
||||
where groupSetting.IsShiftChange // Filter parent tables where isChange is true
|
||||
join employeeSettings in _companyContext.CustomizeWorkshopEmployeeSettings on groupSetting.id equals employeeSettings.CustomizeWorkshopGroupSettingId
|
||||
where employeeSettings.IsShiftChanged// Filter child tables where isChange is true
|
||||
join employee in _companyContext.Employees on employeeSettings.EmployeeId equals employee.id
|
||||
group new { employee.FullName, groupSetting.GroupName } by groupSetting.id into grouped
|
||||
select new ChangedGroupedViewModel
|
||||
{
|
||||
GroupName = grouped.First().GroupName,
|
||||
EmployeeName = grouped.Select(e => e.FullName).ToList()
|
||||
};
|
||||
|
||||
return result.ToList();
|
||||
|
||||
}
|
||||
|
||||
public CustomizeWorkshopSettingsViewModel GetWorkshopIncludeGroupsByWorkshopId(long workshopId)
|
||||
{
|
||||
var customizeWorkshopSettings = _companyContext.CustomizeWorkshopSettings
|
||||
.AsNoTracking().AsSplitQuery().Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.Select(x => new CustomizeWorkshopSettingsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
GroupSettings = x.CustomizeWorkshopGroupSettingsCollection.Select(g =>
|
||||
Id = entity.id,
|
||||
Name = auth.WorkshopList.FirstOrDefault(w => w.Id == entity.WorkshopId)?.Name,
|
||||
GroupSettings = entity.CustomizeWorkshopGroupSettingsCollection.Where(x => !x.MainGroup).Select(x =>
|
||||
new CustomizeWorkshopGroupSettingsViewModel()
|
||||
{
|
||||
Id = g.id,
|
||||
IrregularShift = g.IrregularShift,
|
||||
WorkshopShiftStatus = g.WorkshopShiftStatus,
|
||||
GroupName = g.GroupName,
|
||||
MainGroup = g.MainGroup,
|
||||
RollCallWorkshopShifts = g.CustomizeWorkshopGroupSettingsShifts.Select(s =>
|
||||
Id = x.id,
|
||||
GroupName = x.GroupName,
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
IrregularShift = x.IrregularShift,
|
||||
Salary = x.Salary,
|
||||
RollCallWorkshopShifts = x.CustomizeWorkshopGroupSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
StartTime = s.StartTime.ToString("HH:mm"),
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
}).ToList(),
|
||||
BreakTime = g.BreakTime,
|
||||
HolidayWork = g.HolidayWork,
|
||||
FridayWork = g.FridayWork,
|
||||
CustomizeRotatingShiftsViewModels = g.CustomizeRotatingShifts.Select(r => new CustomizeRotatingShiftsViewModel()
|
||||
{
|
||||
EndTime = r.EndTime.ToString("HH:mm"),
|
||||
StartTime = r.StartTime.ToString("HH:mm")
|
||||
}).ToList()
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
|
||||
}).ToList(),
|
||||
MainGroup = x.MainGroup,
|
||||
CustomizeRotatingShiftsViewModels = x.CustomizeRotatingShifts.
|
||||
Select(r=>new CustomizeRotatingShiftsViewModel(){StartTime = r.StartTime.ToString("HH:mm"), EndTime = r.EndTime.ToString("HH:mm")}).ToList()
|
||||
}).ToList(),
|
||||
|
||||
|
||||
}).FirstOrDefault();
|
||||
|
||||
return customizeWorkshopSettings;
|
||||
}
|
||||
|
||||
public CustomizeWorkshopEmployeeSettingsViewModel GetEmployeeSettingsByWorkshopIdEmployeeId(long workshopId, long employeeId)
|
||||
{
|
||||
var employee = _companyContext.CustomizeWorkshopSettings
|
||||
.AsSplitQuery().Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.FirstOrDefault(x => x.WorkshopId == workshopId)?.CustomizeWorkshopGroupSettingsCollection.SelectMany(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.FirstOrDefault(x => x.EmployeeId == employeeId);
|
||||
|
||||
if (employee == null)
|
||||
return new();
|
||||
|
||||
var employeeName = _companyContext.Employees.Select(x => new { x.FullName, x.id })
|
||||
.FirstOrDefault(x => x.id == employee.EmployeeId);
|
||||
return new CustomizeWorkshopEmployeeSettingsViewModel()
|
||||
};
|
||||
}
|
||||
public CustomizeWorkshopSettingsViewModel GetWorkshopSettingsByWorkshopIdForAdmin(long workshopId)
|
||||
{
|
||||
Id = employee.id,
|
||||
EmployeeId = employee.EmployeeId,
|
||||
IsSettingChanged = employee.IsSettingChanged,
|
||||
IsShiftChanged = employee.IsShiftChanged,
|
||||
Name = employeeName?.FullName,
|
||||
RollCallWorkshopShifts = employee.CustomizeWorkshopEmployeeSettingsShifts.Select(x =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection).AsSplitQuery()
|
||||
.FirstOrDefault();
|
||||
if (entity == null)
|
||||
return new();
|
||||
|
||||
return new CustomizeWorkshopSettingsViewModel()
|
||||
{
|
||||
Id = entity.id,
|
||||
Offset = entity.EndTimeOffSet,
|
||||
GroupSettings = entity.CustomizeWorkshopGroupSettingsCollection.Where(x => !x.MainGroup).Select(x =>
|
||||
new CustomizeWorkshopGroupSettingsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
GroupName = x.GroupName,
|
||||
RollCallWorkshopEmployeesSettings = x.CustomizeWorkshopEmployeeSettingsCollection.Select(y =>
|
||||
{
|
||||
var employee = _employeeRepository.Get(y.EmployeeId);
|
||||
return new CustomizeWorkshopEmployeeSettingsViewModel()
|
||||
{
|
||||
Id = y.id,
|
||||
EmployeeId = y.EmployeeId,
|
||||
IsSettingChanged = y.IsSettingChanged,
|
||||
IsShiftChanged = y.IsShiftChanged,
|
||||
Name = $"{employee?.FName} {employee?.LName}",
|
||||
RollCallWorkshopShifts = y.CustomizeWorkshopEmployeeSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
Salary = y.Salary,
|
||||
CustomizeRotatingShiftsViewModels = y.CustomizeRotatingShifts.Select(r => new CustomizeRotatingShiftsViewModel
|
||||
{
|
||||
StartTime = r.StartTime.ToString("HH:mm"),
|
||||
EndTime = r.EndTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
LeavePermittedDays = y.LeavePermittedDays,
|
||||
IrregularShift = y.IrregularShift,
|
||||
WorkshopShiftStatus = y.WorkshopShiftStatus
|
||||
};
|
||||
}).ToList(),
|
||||
Salary = x.Salary,
|
||||
RollCallWorkshopShifts = x.CustomizeWorkshopGroupSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
StartTime = s.StartTime.ToString("HH:mm")
|
||||
|
||||
}).ToList(),
|
||||
MainGroup = x.MainGroup,
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
CustomizeRotatingShiftsViewModels = x.CustomizeRotatingShifts.Select(r=>new CustomizeRotatingShiftsViewModel
|
||||
{
|
||||
StartTime = r.StartTime.ToString("HH:mm"),
|
||||
EndTime = r.EndTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
IrregularShift = x.IrregularShift
|
||||
|
||||
|
||||
|
||||
}).ToList(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
public EditCustomizeWorkshopSettings GetWorkshopSettingsDetails(long workshopId)
|
||||
{
|
||||
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
if (entity == null)
|
||||
return new();
|
||||
var viewModel = new EditCustomizeWorkshopSettings()
|
||||
{
|
||||
FridayWork = entity.FridayWork,
|
||||
FridayPay = new() { FridayPayType = entity.FridayPay.FridayPayType, Value = entity.FridayPay.Value },
|
||||
LateToWork = new()
|
||||
{
|
||||
LateToWorkTimeFinesVewModels = entity.LateToWork.LateToWorkTimeFines.Select(x =>
|
||||
new LateToWorkTimeFineVewModel() { FineMoney = x.FineMoney, Minute = x.Minute }).ToList(),
|
||||
Value = entity.LateToWork.Value,
|
||||
LateToWorkType = entity.LateToWork.LateToWorkType
|
||||
},
|
||||
HolidayWork = entity.HolidayWork,
|
||||
FineAbsenceDeduction = new()
|
||||
{
|
||||
Value = entity.FineAbsenceDeduction.Value,
|
||||
FineAbsenceDayOfWeekViewModels = entity.FineAbsenceDeduction.FineAbsenceDayOfWeekCollection
|
||||
.Select(x => new FineAbsenceDayOfWeekViewModel() { DayOfWeek = x.DayOfWeek }).ToList(),
|
||||
FineAbsenceDeductionType = entity.FineAbsenceDeduction.FineAbsenceDeductionType
|
||||
},
|
||||
EarlyExit = new()
|
||||
{
|
||||
EarlyExitTimeFinesViewModels = entity.EarlyExit.EarlyExitTimeFines.Select(x =>
|
||||
new EarlyExitTimeFineViewModel() { FineMoney = x.FineMoney, Minute = x.Minute }).ToList(),
|
||||
Value = entity.EarlyExit.Value,
|
||||
EarlyExitType = entity.EarlyExit.EarlyExitType
|
||||
},
|
||||
BonusesPay = new()
|
||||
{
|
||||
Value = entity.BonusesPay.Value,
|
||||
BonusesPayType = entity.BonusesPay.BonusesPayType,
|
||||
PaymentType = entity.BonusesPay.PaymentType
|
||||
},
|
||||
ShiftPay = new()
|
||||
{
|
||||
Value = entity.ShiftPay.Value,
|
||||
ShiftPayType = entity.ShiftPay.ShiftPayType,
|
||||
ShiftType = entity.ShiftPay.ShiftType
|
||||
},
|
||||
InsuranceDeduction = new()
|
||||
{
|
||||
Value = entity.InsuranceDeduction.Value,
|
||||
InsuranceDeductionType = entity.InsuranceDeduction.InsuranceDeductionType
|
||||
},
|
||||
OverTimePay = new()
|
||||
{ OverTimePayType = entity.OverTimePay.OverTimePayType, Value = entity.OverTimePay.Value },
|
||||
BaseYearsPay = new()
|
||||
{
|
||||
BaseYearsPayType = entity.BaseYearsPay.BaseYearsPayType,
|
||||
Value = entity.BaseYearsPay.Value,
|
||||
PaymentType = entity.BaseYearsPay.PaymentType
|
||||
},
|
||||
NightWorkPay = new()
|
||||
{ NightWorkingType = entity.NightWorkPay.NightWorkingType, Value = entity.NightWorkPay.Value },
|
||||
LeavePay = new()
|
||||
{
|
||||
Value = entity.LeavePay.Value,
|
||||
LeavePayType = entity.LeavePay.LeavePayType
|
||||
},
|
||||
MarriedAllowance = new()
|
||||
{
|
||||
Value = entity.MarriedAllowance.Value,
|
||||
MarriedAllowanceType = entity.MarriedAllowance.MarriedAllowanceType
|
||||
},
|
||||
FamilyAllowance = new()
|
||||
{
|
||||
FamilyAllowanceType = entity.FamilyAllowance.FamilyAllowanceType,
|
||||
Value = entity.FamilyAllowance.Value
|
||||
},
|
||||
Currency = entity.Currency,
|
||||
MaxMonthDays = entity.MaxMonthDays,
|
||||
Id = entity.id,
|
||||
ShiftsList = entity.CustomizeWorkshopSettingsShifts.Select(x => new CustomizeWorkshopShiftViewModel()
|
||||
{ EndTime = x.EndTime.ToString("HH:mm"), Placement = x.Placement, StartTime = x.StartTime.ToString("HH:mm") }).ToList(),
|
||||
BonusesPaysInEndOfMonth = entity.BonusesPaysInEndOfMonth,
|
||||
LeavePermittedDays = entity.LeavePermittedDays,
|
||||
BaseYearsPayInEndOfYear = entity.BaseYearsPayInEndOfYear,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus
|
||||
|
||||
};
|
||||
return viewModel;
|
||||
|
||||
}
|
||||
|
||||
public CustomizeWorkshopSettings GetBy(long workshopId)
|
||||
{
|
||||
return _companyContext.CustomizeWorkshopSettings.FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
}
|
||||
|
||||
public EditCustomizeWorkshopSettings GetSimpleWorkshopSettings(long workshopId)
|
||||
{
|
||||
var entity = _companyContext.CustomizeWorkshopSettings.AsSplitQuery().FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
if (entity == null)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
||||
return new()
|
||||
{
|
||||
ShiftsList = entity.CustomizeWorkshopSettingsShifts.Select(x => new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = x.EndTime.ToString("HH:mm"),
|
||||
Placement = x.Placement,
|
||||
StartTime = x.StartTime.ToString("HH:mm")
|
||||
StartTime = x.StartTime.ToString("HH:mm"),
|
||||
Placement = x.Placement
|
||||
}).ToList(),
|
||||
Salary = employee.Salary
|
||||
};
|
||||
}
|
||||
Id = entity.id,
|
||||
WorkshopId = entity.WorkshopId,
|
||||
WorkshopShiftStatus = entity.WorkshopShiftStatus,
|
||||
FridayWork = entity.FridayWork,
|
||||
HolidayWork = entity.HolidayWork
|
||||
|
||||
#region Pooya
|
||||
public List<CustomizeWorkshopEmployeeSettingsViewModel> GetEmployeeSettingsWithMonthlySalary(long workshopId)
|
||||
{
|
||||
var query = _companyContext.CustomizeWorkshopGroupSettings.Where(x => x.MainGroup == false).Include(x => x)
|
||||
.Include(x => x.CustomizeWorkshopEmployeeSettingsCollection).Where(x => x.CustomizeWorkshopEmployeeSettingsCollection.Any(y =>
|
||||
};
|
||||
}
|
||||
|
||||
public List<ChangedGroupedViewModel> GetShiftChangesGroupAndEmployees(long customizeWorkshopSettingsId)
|
||||
{
|
||||
|
||||
|
||||
var result = from groupSetting in _companyContext.CustomizeWorkshopGroupSettings.AsSplitQuery()
|
||||
where groupSetting.IsShiftChange // Filter parent tables where isChange is true
|
||||
join employeeSettings in _companyContext.CustomizeWorkshopEmployeeSettings on groupSetting.id equals employeeSettings.CustomizeWorkshopGroupSettingId
|
||||
where employeeSettings.IsShiftChanged// Filter child tables where isChange is true
|
||||
join employee in _companyContext.Employees on employeeSettings.EmployeeId equals employee.id
|
||||
group new { employee.FullName, groupSetting.GroupName } by groupSetting.id into grouped
|
||||
select new ChangedGroupedViewModel
|
||||
{
|
||||
GroupName = grouped.First().GroupName,
|
||||
EmployeeName = grouped.Select(e => e.FullName).ToList()
|
||||
};
|
||||
|
||||
return result.ToList();
|
||||
|
||||
}
|
||||
|
||||
public CustomizeWorkshopSettingsViewModel GetWorkshopIncludeGroupsByWorkshopId(long workshopId)
|
||||
{
|
||||
var customizeWorkshopSettings = _companyContext.CustomizeWorkshopSettings
|
||||
.AsNoTracking().AsSplitQuery().Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.Select(x => new CustomizeWorkshopSettingsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
GroupSettings = x.CustomizeWorkshopGroupSettingsCollection.Select(g =>
|
||||
new CustomizeWorkshopGroupSettingsViewModel()
|
||||
{
|
||||
Id = g.id,
|
||||
IrregularShift = g.IrregularShift,
|
||||
WorkshopShiftStatus = g.WorkshopShiftStatus,
|
||||
GroupName = g.GroupName,
|
||||
MainGroup = g.MainGroup,
|
||||
Salary = g.Salary,
|
||||
SalaryStr = g.Salary.ToMoney(),
|
||||
LeavePermitted = g.LeavePermittedDays,
|
||||
RollCallWorkshopShifts = g.CustomizeWorkshopGroupSettingsShifts.Select(s =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
StartTime = s.StartTime.ToString("HH:mm"),
|
||||
EndTime = s.EndTime.ToString("HH:mm"),
|
||||
Placement = s.Placement,
|
||||
}).ToList(),
|
||||
BreakTime = g.BreakTime,
|
||||
HolidayWork = g.HolidayWork,
|
||||
FridayWork = g.FridayWork,
|
||||
CustomizeRotatingShiftsViewModels = g.CustomizeRotatingShifts.Select(r=>new CustomizeRotatingShiftsViewModel()
|
||||
{
|
||||
EndTime = r.EndTime.ToString("HH:mm"),
|
||||
StartTime= r.StartTime.ToString("HH:mm")
|
||||
}).ToList()
|
||||
|
||||
}).ToList(),
|
||||
|
||||
|
||||
}).FirstOrDefault();
|
||||
|
||||
return customizeWorkshopSettings;
|
||||
}
|
||||
|
||||
public CustomizeWorkshopEmployeeSettingsViewModel GetEmployeeSettingsByWorkshopIdEmployeeId(long workshopId, long employeeId)
|
||||
{
|
||||
var employee = _companyContext.CustomizeWorkshopSettings
|
||||
.AsSplitQuery().Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.FirstOrDefault(x => x.WorkshopId == workshopId)?.CustomizeWorkshopGroupSettingsCollection.SelectMany(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.FirstOrDefault(x => x.EmployeeId == employeeId);
|
||||
|
||||
if (employee == null)
|
||||
return new();
|
||||
|
||||
var employeeName = _companyContext.Employees.Select(x => new { x.FullName, x.id })
|
||||
.FirstOrDefault(x => x.id == employee.EmployeeId);
|
||||
return new CustomizeWorkshopEmployeeSettingsViewModel()
|
||||
{
|
||||
Id = employee.id,
|
||||
EmployeeId = employee.EmployeeId,
|
||||
IsSettingChanged = employee.IsSettingChanged,
|
||||
IsShiftChanged = employee.IsShiftChanged,
|
||||
Name = employeeName?.FullName,
|
||||
RollCallWorkshopShifts = employee.CustomizeWorkshopEmployeeSettingsShifts.Select(x =>
|
||||
new CustomizeWorkshopShiftViewModel()
|
||||
{
|
||||
EndTime = x.EndTime.ToString("HH:mm"),
|
||||
Placement = x.Placement,
|
||||
StartTime = x.StartTime.ToString("HH:mm")
|
||||
}).ToList(),
|
||||
Salary = employee.Salary
|
||||
};
|
||||
}
|
||||
|
||||
#region Pooya
|
||||
public List<CustomizeWorkshopEmployeeSettingsViewModel> GetEmployeeSettingsWithMonthlySalary(long workshopId)
|
||||
{
|
||||
var query = _companyContext.CustomizeWorkshopGroupSettings.Where(x => x.MainGroup == false).Include(x => x)
|
||||
.Include(x => x.CustomizeWorkshopEmployeeSettingsCollection).Where(x => x.CustomizeWorkshopEmployeeSettingsCollection.Any(y =>
|
||||
y.WorkshopId == workshopId)).SelectMany(x => x.CustomizeWorkshopEmployeeSettingsCollection)
|
||||
.Where(x => x.Salary > 0).Select(x =>
|
||||
.Where(x => x.Salary > 0).Select(x =>
|
||||
new CustomizeWorkshopEmployeeSettingsViewModel()
|
||||
{
|
||||
WorkshopShiftStatus = x.WorkshopShiftStatus,
|
||||
@@ -374,31 +361,26 @@ public class CustomizeWorkshopSettingsRepository(CompanyContext companyContext,
|
||||
EmployeeId = x.EmployeeId,
|
||||
BreakTime = x.BreakTime
|
||||
});
|
||||
return query.ToList();
|
||||
}
|
||||
return query.ToList();
|
||||
}
|
||||
|
||||
public List<CustomizeWorkshopEmployeeSettingsViewModel> GetEmployeeSettingsByWorkshopId(long workshopId)
|
||||
{
|
||||
return _companyContext.CustomizeWorkshopSettings.AsNoTracking().Where(x => x.WorkshopId == workshopId).Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection).SelectMany(x => x.CustomizeWorkshopGroupSettingsCollection
|
||||
public List<CustomizeWorkshopEmployeeSettingsViewModel> GetEmployeeSettingsByWorkshopId(long workshopId)
|
||||
{
|
||||
return _companyContext.CustomizeWorkshopSettings.AsNoTracking().Where(x => x.WorkshopId == workshopId).Include(x => x.CustomizeWorkshopGroupSettingsCollection)
|
||||
.ThenInclude(x => x.CustomizeWorkshopEmployeeSettingsCollection).SelectMany(x => x.CustomizeWorkshopGroupSettingsCollection
|
||||
.SelectMany(y => y.CustomizeWorkshopEmployeeSettingsCollection))
|
||||
.Select(x => new CustomizeWorkshopEmployeeSettingsViewModel
|
||||
{
|
||||
BreakTime = x.BreakTime,
|
||||
IsShiftChanged = x.IsShiftChanged,
|
||||
IsSettingChanged = x.IsSettingChanged,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Id = x.id,
|
||||
Salary = x.Salary,
|
||||
GroupSettingsId = x.CustomizeWorkshopGroupSettingId
|
||||
}).ToList();
|
||||
}
|
||||
.Select(x => new CustomizeWorkshopEmployeeSettingsViewModel
|
||||
{
|
||||
BreakTime = x.BreakTime,
|
||||
IsShiftChanged = x.IsShiftChanged,
|
||||
IsSettingChanged = x.IsSettingChanged,
|
||||
EmployeeId = x.EmployeeId,
|
||||
Id = x.id,
|
||||
Salary = x.Salary,
|
||||
GroupSettingsId = x.CustomizeWorkshopGroupSettingId
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public CustomizeWorkshopSettings GetBy(long workshopId)
|
||||
{
|
||||
return _companyContext.CustomizeWorkshopSettings.AsSplitQuery()
|
||||
.FirstOrDefault(x => x.WorkshopId == workshopId);
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using _0_Framework.Exceptions;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
@@ -478,6 +481,248 @@ public class PersonalContractingPartyRepository : RepositoryBase<long, PersonalC
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Api
|
||||
public async Task<ICollection<ContractingPartyGetListViewModel>> GetList(ContractingPartyGetListSearchModel searchModel)
|
||||
{
|
||||
var personalContractingPartiesQuery = _context.PersonalContractingParties
|
||||
.Include(x => x.Representative)
|
||||
.Include(x => x.Employers).AsQueryable();
|
||||
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.NationalIdOrNationalCode))
|
||||
personalContractingPartiesQuery = personalContractingPartiesQuery
|
||||
.Where(x => x.Nationalcode.Contains(searchModel.NationalIdOrNationalCode) ||
|
||||
x.NationalId.Contains(searchModel.NationalIdOrNationalCode));
|
||||
|
||||
|
||||
if (searchModel.ContractingPartyType != LegalType.None)
|
||||
|
||||
{
|
||||
string type = searchModel.ContractingPartyType switch
|
||||
{
|
||||
LegalType.Legal => "حقوقی",
|
||||
LegalType.Real => "حقیقی",
|
||||
_ => ""
|
||||
};
|
||||
|
||||
personalContractingPartiesQuery = personalContractingPartiesQuery
|
||||
.Where(x => x.IsLegal == type);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (searchModel.ContractingPartyStatus != ActivationStatus.None)
|
||||
{
|
||||
string status = searchModel.ContractingPartyStatus switch
|
||||
{
|
||||
ActivationStatus.Active => "true",
|
||||
ActivationStatus.DeActive => "false",
|
||||
_ => ""
|
||||
};
|
||||
personalContractingPartiesQuery = personalContractingPartiesQuery
|
||||
.Where(x => x.IsActiveString == status);
|
||||
}
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.RepresentativeName))
|
||||
{
|
||||
personalContractingPartiesQuery = personalContractingPartiesQuery
|
||||
.Where(x => x.Representative.FullName.Contains(searchModel.RepresentativeName));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.FullNameOrCompanyName))
|
||||
{
|
||||
personalContractingPartiesQuery = personalContractingPartiesQuery.Where(x =>
|
||||
(x.FName + " " + x.LName).Contains(searchModel.FullNameOrCompanyName));
|
||||
}
|
||||
var joinedQuery = personalContractingPartiesQuery
|
||||
.GroupJoin(_context.InstitutionContractSet.Where(x => personalContractingPartiesQuery.Any(p => p.id == x.ContractingPartyId)),
|
||||
contractingParty => contractingParty.id,
|
||||
institution => institution.ContractingPartyId,
|
||||
(contractingParty, institution) => new
|
||||
{
|
||||
contractingParty,
|
||||
institution
|
||||
});
|
||||
|
||||
var result = await joinedQuery.Skip(searchModel.PageIndex)
|
||||
.Take(30).Select(x => new ContractingPartyGetListViewModel()
|
||||
{
|
||||
ArchiveCode = x.contractingParty.ArchiveCode,
|
||||
BlockTimes = x.contractingParty.BlockTimes,
|
||||
|
||||
ContractingPartyName = x.contractingParty.IsLegal == "حقیقی" ?
|
||||
x.contractingParty.SureName == null ? $"{x.contractingParty.FName} {x.contractingParty.LName}"
|
||||
: $"{x.contractingParty.FName} {x.contractingParty.LName} {x.contractingParty.SureName}"
|
||||
: x.contractingParty.SureName == null ? $"{x.contractingParty.LName}"
|
||||
: $"{x.contractingParty.LName} {x.contractingParty.SureName}",
|
||||
|
||||
ContractingPartyType = x.contractingParty.IsLegal == "حقیقی" ? LegalType.Real : LegalType.Legal,
|
||||
Employers = x.contractingParty.Employers.Take(11).Select(e => new ContractingPartyGetListEmployerViewModel(e.id, e.FullName)).ToList(),
|
||||
Id = x.contractingParty.id,
|
||||
IsBlock = x.contractingParty.IsBlock == "true",
|
||||
HasInstitutionContract = x.institution.Any(i => i.IsActiveString == "true"),
|
||||
NationalIdOrNationalCode = x.contractingParty.IsLegal == "حقیقی" ? x.contractingParty.Nationalcode : x.contractingParty.NationalId,
|
||||
Status = x.contractingParty.IsActiveString == "true" ? ActivationStatus.Active : ActivationStatus.DeActive
|
||||
}).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<List<ContractingPartySelectListViewModel>> GetSelectList()
|
||||
{
|
||||
return await _context.PersonalContractingParties.Select(x => new ContractingPartySelectListViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
Text = x.IsLegal == "حقیقی" ? x.SureName == null
|
||||
? $"{x.FName} {x.LName}"
|
||||
: $"{x.FName} {x.LName} {x.SureName}"
|
||||
: x.SureName == null ? $"{x.LName}"
|
||||
: $"{x.LName} {x.SureName}",
|
||||
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<List<GetContractingPartyNationalCodeOrNationalIdViewModel>> GetNationalCodeOrNationalId()
|
||||
{
|
||||
return await _context.PersonalContractingParties.Select(x => new GetContractingPartyNationalCodeOrNationalIdViewModel
|
||||
{
|
||||
NationalCodeOrNationalId = x.IsLegal == "true" ? x.NationalId : x.Nationalcode
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<OperationResult<string>> DeactivateWithSubordinates(long id)
|
||||
{
|
||||
var op = new OperationResult<string>();
|
||||
;
|
||||
using (var transaction = await _context.Database.BeginTransactionAsync())
|
||||
{
|
||||
try
|
||||
{
|
||||
var contractingParty = await _context.PersonalContractingParties
|
||||
.Include(x => x.Employers)
|
||||
.ThenInclude(x => x.Contracts)
|
||||
.Include(x => x.Employers)
|
||||
.ThenInclude(x => x.WorkshopEmployers)
|
||||
.ThenInclude(x => x.Workshop)
|
||||
.ThenInclude(x => x.Checkouts).FirstOrDefaultAsync(x => x.id == id);
|
||||
if (contractingParty == null)
|
||||
{
|
||||
return op.Failed("چنین آیتمی وجود ندارد");
|
||||
}
|
||||
|
||||
var employers = contractingParty.Employers;
|
||||
|
||||
var workshops = employers.SelectMany(x => x.WorkshopEmployers).Select(x => x.Workshop).ToList();
|
||||
|
||||
var contracts = employers.SelectMany(x => x.Contracts).ToList();
|
||||
|
||||
var checkouts = workshops.SelectMany(x => x.Checkouts).ToList();
|
||||
|
||||
|
||||
contractingParty.DeActive();
|
||||
|
||||
foreach (var employer in employers)
|
||||
{
|
||||
employer.DeActive();
|
||||
}
|
||||
|
||||
foreach (var workshop in workshops)
|
||||
{
|
||||
workshop.DeActive(workshop.ArchiveCode);
|
||||
}
|
||||
|
||||
foreach (var contract in contracts)
|
||||
{
|
||||
contract.DeActive();
|
||||
}
|
||||
|
||||
foreach (var checkout in checkouts)
|
||||
{
|
||||
checkout.DeActive();
|
||||
}
|
||||
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
await transaction.CommitAsync();
|
||||
return op.Succcedded("DeActivate");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
await transaction.RollbackAsync();
|
||||
return op.Failed("غیرفعال کردن طرف حساب با خطا مواجه شد");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<GetRealContractingPartyDetailsViewModel> GetRealDetails(long id)
|
||||
{
|
||||
var res = await _context.PersonalContractingParties.Where(x => x.IsLegal == "حقیقی").Select(x =>
|
||||
new GetRealContractingPartyDetailsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
IdNumber = x.IdNumber,
|
||||
PhoneNumber = x.Phone,
|
||||
AgentPhone = x.AgentPhone,
|
||||
Address = x.Address,
|
||||
FullName = x.SureName == null
|
||||
? $"{x.FName} {x.LName}"
|
||||
: $"{x.FName} {x.LName} {x.SureName}",
|
||||
NationalCode = x.Nationalcode,
|
||||
RepresentativeName = x.RepresentativeFullName,
|
||||
ArchiveCode = x.ArchiveCode,
|
||||
City = x.City,
|
||||
FName = x.FName,
|
||||
LName = x.LName,
|
||||
SureName = x.SureName,
|
||||
RepresentativeId = x.RepresentativeId,
|
||||
State = x.State,
|
||||
Zone = x.Zone
|
||||
}).FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
if (res == null)
|
||||
{
|
||||
throw new BadRequestException("چنین طرف حسابی وجود ندارد");
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
public async Task<GetLegalContractingPartyDetailsViewModel> GetLegalDetails(long id)
|
||||
{
|
||||
var res = await _context.PersonalContractingParties.Where(x => x.IsLegal == "حقوقی").Select(x =>
|
||||
new GetLegalContractingPartyDetailsViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
PhoneNumber = x.Phone,
|
||||
AgentPhone = x.AgentPhone,
|
||||
Address = x.Address,
|
||||
CompanyFullName = x.SureName == null
|
||||
? $"{x.LName}"
|
||||
: $"{x.LName} {x.SureName}",
|
||||
NationalId = x.NationalId,
|
||||
RegisterId = x.RegisterId,
|
||||
RepresentativeName = x.RepresentativeFullName,
|
||||
RepresentativeId = x.RepresentativeId,
|
||||
State = x.State,
|
||||
SureName = x.SureName,
|
||||
Zone = x.Zone,
|
||||
ArchiveCode = x.ArchiveCode,
|
||||
City = x.City,
|
||||
CompanyName = x.LName
|
||||
}).FirstOrDefaultAsync(x => x.Id == id);
|
||||
|
||||
if (res == null)
|
||||
{
|
||||
throw new BadRequestException("چنین طرف حسابی وجود ندارد");
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.InstitutionPlanAgg;
|
||||
@@ -170,7 +169,6 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
|
||||
}
|
||||
|
||||
|
||||
public InstitutionPlanViewModel GetInstitutionPlanForWorkshop(WorkshopTempViewModel command)
|
||||
{
|
||||
var planPercentage = _context.PlanPercentages.FirstOrDefault();
|
||||
@@ -184,7 +182,10 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
|
||||
var dailyWage = dailyWageYearlySalery.YearlySalaryItemsList.Where(x => x.ItemName == "مزد روزانه")
|
||||
.Select(x => x.ItemValue).FirstOrDefault();
|
||||
|
||||
if (command.ContractAndCheckout)
|
||||
command.ContractAndCheckoutInPerson = true;
|
||||
if(command.Insurance)
|
||||
command.InsuranceInPerson = true;
|
||||
|
||||
if (command.CountPerson > 0)
|
||||
{
|
||||
@@ -193,28 +194,28 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
.Select(plan => new InstitutionPlanViewModel
|
||||
{
|
||||
CountPerson = plan.CountPerson,
|
||||
|
||||
|
||||
ContractAndCheckoutDouble = command.ContractAndCheckout ?
|
||||
((dailyWage * planPercentage.ContractAndCheckoutPercent / 100) * plan.CountPerson * plan.IncreasePercentage) : 0,
|
||||
|
||||
|
||||
InsuranceDouble = command.Insurance ? (((dailyWage * planPercentage.InsurancePercent) / 100) * plan.CountPerson *
|
||||
plan.IncreasePercentage) : 0,
|
||||
|
||||
|
||||
RollCallDouble = command.RollCall ? (((dailyWage * planPercentage.RollCallPercent) / 100) * plan.CountPerson *
|
||||
plan.IncreasePercentage) : 0,
|
||||
|
||||
CustomizeCheckoutDouble = (((dailyWage * planPercentage.CustomizeCheckoutPercent) / 100) * plan.CountPerson *
|
||||
plan.IncreasePercentage),
|
||||
|
||||
ContractAndCheckoutInPersonDouble = command.ContractAndCheckoutInPerson ? (((dailyWage * planPercentage.ContractAndCheckoutInPersonPercent) / 100) * plan.CountPerson *
|
||||
|
||||
CustomizeCheckoutDouble =command.CustomizeCheckout ? (((dailyWage * planPercentage.CustomizeCheckoutPercent) / 100) * plan.CountPerson *
|
||||
plan.IncreasePercentage) : 0,
|
||||
|
||||
ContractAndCheckoutInPersonDouble = command.ContractAndCheckoutInPerson ? (((dailyWage * planPercentage.ContractAndCheckoutInPersonPercent) / 100) * plan.CountPerson *
|
||||
plan.IncreasePercentage) : 0,
|
||||
|
||||
|
||||
InsuranceInPersonDouble = command.InsuranceInPerson ? (((dailyWage * planPercentage.InsuranceInPersonPercent) / 100) * plan.CountPerson *
|
||||
plan.IncreasePercentage) : 0,
|
||||
|
||||
|
||||
}).FirstOrDefault();
|
||||
|
||||
if(planByCountPerson == null)
|
||||
if (planByCountPerson == null)
|
||||
return new InstitutionPlanViewModel();
|
||||
//مبلغ کل خدمات حضوری
|
||||
var inPersonSumAmount = planByCountPerson.ContractAndCheckoutDouble + planByCountPerson.InsuranceDouble +
|
||||
@@ -236,7 +237,7 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
{
|
||||
CountPerson = planByCountPerson.CountPerson,
|
||||
|
||||
ContractAndCheckout = planByCountPerson.ContractAndCheckoutDouble > 0 ? planByCountPerson.ContractAndCheckoutDouble.ToMoney() : "0",
|
||||
ContractAndCheckout = planByCountPerson.ContractAndCheckoutDouble > 0 ? planByCountPerson.ContractAndCheckoutDouble.ToMoney() : "0",
|
||||
|
||||
Insurance = planByCountPerson.InsuranceDouble > 0 ? planByCountPerson.InsuranceDouble.ToMoney() : "0",
|
||||
|
||||
@@ -259,7 +260,7 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
return new InstitutionPlanViewModel();
|
||||
}
|
||||
|
||||
@@ -40,5 +40,11 @@ public class WorkshopTempRepository : RepositoryBase<long, WorkshopTemp>, IWorks
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task RemoveWorkshopTemps(List<long> workshopTempIds)
|
||||
{
|
||||
var result = _context.WorkshopTemps.Where(x => workshopTempIds.Contains(x.id));
|
||||
|
||||
_context.RemoveRange(result);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
@@ -205,6 +205,8 @@ using CompanyManagment.App.Contracts.EmployeeClientTemp;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
using Company.Domain.ContactUsAgg;
|
||||
using CompanyManagment.App.Contracts.ContactUs;
|
||||
using Company.Domain.EmployeeAuthorizeTempAgg;
|
||||
using Company.Domain.AdminMonthlyOverviewAgg;
|
||||
using CompanyManagment.App.Contracts.AdminMonthlyOverview;
|
||||
@@ -427,8 +429,14 @@ public class PersonalBootstrapper
|
||||
services.AddTransient<ILeftWorkTempRepository, LeftWorkTempRepository>();
|
||||
services.AddTransient<ILeftWorkTempApplication, LeftWorkTempApplication>();
|
||||
|
||||
services.AddTransient<IContactUsRepository, ContactUsRepository>();
|
||||
services.AddTransient<IContactUsApplication, ContactUsApplication>();
|
||||
|
||||
services.AddTransient<IEmployeeAuthorizeTempRepository, EmployeeAuthorizeTempRepository>();
|
||||
|
||||
|
||||
services.AddTransient<IContactUsRepository, ContactUsRepository>();
|
||||
services.AddTransient<IContactUsApplication, ContactUsApplication>();
|
||||
services.AddTransient<IAdminMonthlyOverviewRepository, AdminMonthlyOverviewRepository>();
|
||||
services.AddTransient<IAdminMonthlyOverviewApplication, AdminMonthlyOverviewApplication>();
|
||||
#endregion
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
using System.Diagnostics;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ServiceHost.BaseControllers;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Controllers;
|
||||
|
||||
public class ContractingPartyController : AdminController
|
||||
{
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApplication;
|
||||
|
||||
public ContractingPartyController(IPersonalContractingPartyApp contractingPartyApplication)
|
||||
{
|
||||
_contractingPartyApplication = contractingPartyApplication;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرف حساب
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<ICollection<ContractingPartyGetListViewModel>>> Get([FromQuery] ContractingPartyGetListSearchModel searchModel)
|
||||
{
|
||||
var watch = new Stopwatch();
|
||||
watch.Start();
|
||||
var result = await _contractingPartyApplication.GetList(searchModel);
|
||||
Console.WriteLine(watch.Elapsed);
|
||||
return result.ToList();
|
||||
}
|
||||
[HttpGet("t/{name}")]
|
||||
public async Task<List<string>> TestApi(string name)
|
||||
{
|
||||
var res = _contractingPartyApplication.SearchByName(name).Where(x=>x.Contains(name)).ToList();
|
||||
return res;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات طرف حساب حقیقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("real/{id}")]
|
||||
public async Task<ActionResult<GetRealContractingPartyDetailsViewModel>> GetDetailsReal(long id)
|
||||
{
|
||||
var result = await _contractingPartyApplication.GetRealDetails(id);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات طرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("legal/{id}")]
|
||||
public async Task<ActionResult<GetLegalContractingPartyDetailsViewModel>> GetDetailsLegal(long id)
|
||||
{
|
||||
var result = await _contractingPartyApplication.GetLegalDetails(id);
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرف حساب حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("real")]
|
||||
public async Task<ActionResult<OperationResult>> CreateReal([FromBody] CreateRealContractingParty command)
|
||||
{
|
||||
var result = await _contractingPartyApplication.CreateReal(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("legal")]
|
||||
public async Task<ActionResult<OperationResult>> CreateLegal([FromBody] CreateLegalContractingParty command)
|
||||
{
|
||||
var result = await _contractingPartyApplication.CreateLegal(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرف حساب حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("real")]
|
||||
public ActionResult<OperationResult> EditReal([FromBody] EditRealContractingParty command)
|
||||
{
|
||||
var result = _contractingPartyApplication.EditRealApi(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش طرف حساب حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("legal")]
|
||||
public ActionResult<OperationResult> EditLegal([FromBody] EditLegalContractingParty command)
|
||||
{
|
||||
var result = _contractingPartyApplication.EditLegal(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// چک کردن بلاک بودن طرف حساب با آیدی کارفرما
|
||||
/// </summary>
|
||||
/// <param name="employerId">آیدی کارفرما</param>
|
||||
/// <returns>true - false - NotFound</returns>
|
||||
[HttpGet("is_block/{employerId}")]
|
||||
public ActionResult<string> IsBlockByEmployerId(long employerId)
|
||||
{
|
||||
var result = _contractingPartyApplication.IsBlockByEmployerId(employerId);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// گرفتن آخرین کد بایگانی کارگاه
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("last_archive_code")]
|
||||
public ActionResult<int> GetLastArchiveCodeByContractingPartyId()
|
||||
{
|
||||
var data = _contractingPartyApplication.GetLastArchiveCode();
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست طرف حساب برای جستجو
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("selectList")]
|
||||
public async Task<ActionResult<List<ContractingPartySelectListViewModel>>> GetSelectList()
|
||||
{
|
||||
return await _contractingPartyApplication.GetSelectList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست شناسه ملی یا شماره ملی برای جستجوی
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("national_Code_Select_list")]
|
||||
public async Task<ActionResult<List<GetContractingPartyNationalCodeOrNationalIdViewModel>>> GetNationalCodeOrNationalId()
|
||||
{
|
||||
return await _contractingPartyApplication.GetNationalCodeOrNationalId();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حذف طرف حساب. درصورت داشتن قرارداد مالی یا داشتن کارفرما، طرف حساب غیرفعال میشود
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete]
|
||||
public async Task<OperationResult<string>> DeleteContractingParty(long id)
|
||||
{
|
||||
var operationResult = await _contractingPartyApplication.Delete(id);
|
||||
|
||||
return operationResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
123
ServiceHost/Areas/Admin/Controllers/EmployerController.cs
Normal file
123
ServiceHost/Areas/Admin/Controllers/EmployerController.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ServiceHost.BaseControllers;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Controllers;
|
||||
|
||||
public class EmployerController : AdminController
|
||||
{
|
||||
private readonly IEmployerApplication _employerApplication;
|
||||
|
||||
public EmployerController(IEmployerApplication employerApplication)
|
||||
{
|
||||
_employerApplication = employerApplication;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// لیست کارفرما
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<List<GetEmployerListViewModel>>> GetList(GetEmployerSearchModel searchModel)
|
||||
{
|
||||
return await _employerApplication.GetEmployerList(searchModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات کارفرمای حقوقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("legal/{id}")]
|
||||
public async Task<ActionResult<GetLegalEmployerDetailViewModel>> GetLegalEmployer(long id)
|
||||
{
|
||||
var employerDetail = await _employerApplication.GetLegalEmployerDetail(id);
|
||||
return employerDetail;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جزئیات کارفرمای حقیقی
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("real/{id}")]
|
||||
public async Task<ActionResult<GetRealEmployerDetailViewModel>> GetRealEmployer(long id)
|
||||
{
|
||||
var employerDetail = await _employerApplication.GetRealEmployerDetail(id);
|
||||
return employerDetail;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد کارفرمای حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("real")]
|
||||
public async Task<ActionResult<OperationResult>> CreateRealEmployer([FromBody] CreateRealEmployer command)
|
||||
{
|
||||
var result = await _employerApplication.CreateReal(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد کارفرما حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("legal")]
|
||||
public async Task<ActionResult<OperationResult>> CreateLegalEmployer([FromBody] CreateLegalEmployer command)
|
||||
{
|
||||
var result = await _employerApplication.CreateLegal(command);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش کارفرما حقیقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("real")]
|
||||
public async Task<ActionResult<OperationResult>> EditRealEmployer([FromBody] EditRealEmployer command)
|
||||
{
|
||||
var result = await _employerApplication.EditReal(command);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// ویرایش کارفرما حقوقی
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPut("legal")]
|
||||
public async Task<ActionResult<OperationResult>> EditLegalEmployer([FromBody] EditLegalEmployer command)
|
||||
{
|
||||
var result = await _employerApplication.EditLegal(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حذف کارفرما - درصورت داشتن کارگاه، کارفرما غیرفعال میشود
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{id}")]
|
||||
public async Task<ActionResult<OperationResult<string>>> Remove(long id)
|
||||
{
|
||||
var result = await _employerApplication.RemoveApi(id);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// سلکت لیست کارفرما برای جستجو
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("select_list")]
|
||||
public async Task<List<EmployerSelectListViewModel>> GetSelectList(string search)
|
||||
{
|
||||
return await _employerApplication.GetSelectList(search);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,606 +0,0 @@
|
||||
@using _0_Framework.Application
|
||||
@model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel
|
||||
|
||||
|
||||
|
||||
<div class="container container2" id="printThis">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<fieldset style="border: 1px solid black;
|
||||
padding: revert;
|
||||
border-radius: 10px;
|
||||
height: 28cm;
|
||||
margin: 3mm 5mm 0 5mm; ">
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-xs-3 d-inline-block"><fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; margin-top: 5px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset></div>
|
||||
<div class="col-xs-6 d-inline-block text-center">
|
||||
<p style="margin-top:10px !important;font-size: 18px; font-family: 'IranNastaliq' !important; ">بسمه تعالی</p>
|
||||
<p style="font-size: 15px; font-weight: bold">فیش حقوقی و رسید پرداخت حقوق</p>
|
||||
</div>
|
||||
<div class="col-xs-3 d-inline-block"></div>
|
||||
</div>
|
||||
<div class="row" style="padding: 0px 12px;font-size: 14px; margin-bottom: 10px; ">
|
||||
<div class="row">
|
||||
<span style="width: 280px;padding: 0px 10px 0px 0px !important; float:right"><span>اینجانب <span> </span> <span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.EmployeeFullName</span> </span></span>
|
||||
<span style="margin-right: 5px; float:right">
|
||||
<span> نام پدر: </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.FathersName))
|
||||
{
|
||||
<span style="visibility: hidden">"1111111111"</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.FathersName</span>
|
||||
|
||||
}
|
||||
</span>
|
||||
<span style="padding: 0px !important; float: left">
|
||||
|
||||
<span>به کد ملی:</span> <span> </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
|
||||
{
|
||||
<span style="margin-left: 15px; visibility: hidden">222333111</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="margin-left: 15px; font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.NationalCode</span>
|
||||
}
|
||||
|
||||
<span>متولد:</span> <span> </span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.DateOfBirth))
|
||||
{
|
||||
<span style="margin-left: 10px; visibility: hidden">1401/01/01</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="margin-left: 10px; font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.DateOfBirth</span>
|
||||
}
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="font-size: 14px; text-align: justify">
|
||||
|
||||
@{
|
||||
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
|
||||
{
|
||||
<span> پـرسنل کارگاه<span> </span><span> </span><span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.WorkshopName</span> </span>
|
||||
<span> </span>
|
||||
<span>به کارفرمایی <span> </span> آقای/خانم</span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
if (@Model.EmployerList.Count > 1)
|
||||
{
|
||||
<span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
@Model.EmployerList[0].EmployerFullName <span>،</span>
|
||||
<span> </span>@Model.EmployerList[1].EmployerFullName
|
||||
@if (@Model.EmployerList.Count > 2)
|
||||
{
|
||||
<span>و غیره</span>
|
||||
}
|
||||
</span>
|
||||
<br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
@Model.EmployerList.FirstOrDefault().EmployerFullName
|
||||
</span>
|
||||
<br />
|
||||
}
|
||||
|
||||
}
|
||||
else if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقوقی")
|
||||
{
|
||||
<span> پـرسنل شرکت/موسسه<span> </span><span> </span><span style="font-weight: bold; background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">@Model.WorkshopName</span> </span>
|
||||
<br />
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<span>کلیه حق السعی خود اعم از حقوق، کمک هزینه اقلام مصرفی خانوار، کمک هزینه مسکن </span>
|
||||
|
||||
<span>و همچنین عیدی و پاداش، سنوات و...</span>
|
||||
<span style="background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;"> <span style="font-weight: bold">@Model.Month</span> ماه </span>
|
||||
<span style="background-color: #ebe6e6 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;"> سال <span style="font-weight: bold">@Model.Year</span> </span>
|
||||
<span> برابر با قرارداد به شماره فوق را از کارفرما بصورت وجه نقد و واریز به حساب دریافت نموده ام. </span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row m-t-20">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
|
||||
<tr style="border-bottom: 1px solid; height: 25px; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<th style="text-align: center; width: 8mm; font-size: 12px; padding: 2px; border-collapse: separate; border-radius: 0px 10px 0px 0px;"> </th>
|
||||
<th style="text-align: center; position: absolute ; right: 55mm; font-size: 13px;padding-top:4px"> مطالبات </th>
|
||||
<th style="text-align: center;"> </th>
|
||||
<th style="text-align: center; border-left: 2px solid #000; font-size: 12px"> </th>
|
||||
<th style="text-align: center; font-size: 13px; position: absolute; left: 50mm; padding-top: 4px;"> کسورات </th>
|
||||
<th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 0px 0px 0px 0px;"> </th>
|
||||
<th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 10px 0px 0px 0px;"> </th>
|
||||
</tr>
|
||||
|
||||
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important ;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<th style="width: 5%; text-align: center; border-left: 1px solid #000; font-size: 12px;padding: 2px"> ردیف </th>
|
||||
<th style="width: 23%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
|
||||
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
|
||||
<th style="width: 12%; text-align: center; border-left: 2px solid #000; font-size: 12px"> مبلغ(ریال) </th>
|
||||
<th style="width: 28%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
|
||||
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
|
||||
<th style="width: 12%; text-align: center; font-size: 12px"> مبلغ(ریال) </th>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr style="font-size: 12px; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">1</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حقوق و مزد </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @Model.SumOfWorkingDays </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MonthlySalary == "0" ? "-" : Model.MonthlySalary) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق بیمه سهم کارگر </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.InsuranceDeduction == "0" ? "-" : Model.InsuranceDeduction) </td>
|
||||
</tr>
|
||||
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">2</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> پایه سنوات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مالیات بر حقوق </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.TaxDeducation == "0" ? "-" : Model.TaxDeducation) </td>
|
||||
</tr>
|
||||
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">3</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه اقلام مصرفی خانوار </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.ConsumableItems) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> قسط تسهیلات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.InstallmentDeduction == "0" ? "-" : Model.InstallmentDeduction) </td>
|
||||
</tr>
|
||||
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">4</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه مسکن </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.HousingAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مساعده </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.SalaryAidDeduction == "0" ? "-" : Model.SalaryAidDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">5</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده اضافه کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverTimeWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverTimeWorkValue)) ? "-" : Model.OverTimeWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.OvertimePay == "0" || string.IsNullOrWhiteSpace(Model.OvertimePay)) ? "-" : Model.OvertimePay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> غیبت </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.AbsenceDeduction == "0" ? "-" : Model.AbsenceDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">6</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده شب کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverNightWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverNightWorkValue)) ? "-" : Model.OverNightWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.NightworkPay == "0" || string.IsNullOrWhiteSpace(Model.NightworkPay)) ? "-" : Model.NightworkPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">7</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده جمعه کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.FridayWorkValue == "0" || string.IsNullOrWhiteSpace(Model.FridayWorkValue)) ? "-" : Model.FridayWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.FridayPay == "0" || string.IsNullOrWhiteSpace(Model.FridayPay)) ? "-" : Model.FridayPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">8</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده ماموریت </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MissionPay == "0" ? "-" : Model.MissionPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">9</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده نوبت کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.RotatingShiftValue == "0" || string.IsNullOrWhiteSpace(Model.RotatingShiftValue)) ? "-" : "%" + Model.RotatingShiftValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ShiftPay == "0" ? "-" : Model.ShiftPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه عائله مندی </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.FamilyAllowance == "0" ? "-" : Model.FamilyAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق تاهل </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @Model.MaritalStatus </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MarriedAllowance == "0" ? "-" : Model.MarriedAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">12</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> پاداش </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.RewardPay == "0" ? "-" : Model.RewardPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">13</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی و پاداش </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">14</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.YearsPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">15</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
|
||||
<td style="text-align: center; padding: 2px "></td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع مطالبات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalClaims == "0" ? "-" : Model.TotalClaims) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع کسورات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.TotalDeductions == "0" ? "-" : Model.TotalDeductions) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; border-radius: 0px 0px 10px 10px !important; height: 20px; background-color: #efefef !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; padding: 2px; border-radius: 0px 0px 10px 0px "></td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000; "> مبلغ قابل پرداخت </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalPayment == "0" ? "-" : Model.TotalPayment) </td>
|
||||
<td style="padding-right: 8px;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-radius:0px 0px 0px 10px"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div style="">
|
||||
<div class="" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
|
||||
<div class="" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 15%;padding: 0 0 0 0px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int i = 0; i < 15; i++)
|
||||
{
|
||||
<tr style="@((@Model.MonthlyRollCall[i].IsHoliday || @Model.MonthlyRollCall[i].IsFriday) ? "background-color: #BBBBBB !important;" : "background-color: #FFFFFF !important;") font-size: 8px;border-collapse: separate;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].DateTimeGr.ToFarsi() - @Model.MonthlyRollCall[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
|
||||
|
||||
@if (@Model.MonthlyRollCall[i].IsAbsent)
|
||||
{
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<span style="width: 40px;display: block;border-radius: 50px;background-color: #737373;color: #fff;">غیبت</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
@* <span style="width: 40px;display: block;border-radius: 50px;background-color: #737373;color: #fff;">غیبت</span> *@
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (string.IsNullOrWhiteSpace(Model.MonthlyRollCall[i].LeaveType))
|
||||
{
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate1</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].StartDate2</td>
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].EndDate2</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<span style="width: 41px; display: block; border-radius: 50px; background-color: #fff; color: #737373;border: 1px solid #737373;">
|
||||
@Model.MonthlyRollCall[i].LeaveType
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
@* <span style="width: 40px; display: block; border-radius: 50px; background-color: #fff; color: #737373;border: 1px solid #737373;">
|
||||
@Model.MonthlyRollCall[i].LeaveType
|
||||
</span> *@
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
<td style="font-size: 8px; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@Model.MonthlyRollCall[i].BreakTimeString</td>
|
||||
<td style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (@Model.MonthlyRollCall[i].IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
<circle stroke-width="2" cx="12" cy="12" r="9" stroke="#222222" />
|
||||
<path stroke-width="2" d="M8 12L11 15L16 9" stroke="#222222" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>-</span>
|
||||
}
|
||||
</td>
|
||||
<td style="font-size: 8px;text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact;border-radius: 5px 0 0 5px;">@Model.MonthlyRollCall[i].TotalWorkingHours</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="" style="background-color: #DDDCDC !important; border: 1px solid #CCCCCC;border-radius: 7px;padding: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<table style="width: 100%">
|
||||
<thead style="background-color: #AFAFAF;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<tr style="font-size: 8px;border-collapse: separate;background-color: #AFAFAF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
<th style="font-size: 8px !important;width: 28%;padding: 2px 10px !important;border-left: 0;border-radius: 0 5px 5px 0 !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;">تاریخ</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">ورود</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 9%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">خروج</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 11%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">استراحت</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 10%;-webkit-print-color-adjust: exact;print-color-adjust: exact;">منقطع</th>
|
||||
<th style="font-size: 8px;text-align: center;width: 15%;padding: 0 0 0 0px !important;border-radius: 5px 0 0 5px !important; -webkit-print-color-adjust: exact;print-color-adjust: exact;">ساعت کارکرد</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@{
|
||||
Model.MonthlyRollCall = Model.MonthlyRollCall.Skip(15).ToList();
|
||||
}
|
||||
@foreach (var day in Model.MonthlyRollCall)
|
||||
{
|
||||
<tr style="@((day.IsHoliday || day.IsFriday) ? "background-color: #BBBBBB !important;" : "background-color: #FFFFFF !important;") font-size: 8px;border-collapse: separate;-webkit-print-color-adjust: exact;print-color-adjust: exact;">
|
||||
<td style="font-size: 8px; padding: 1px 3px;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid; border-radius: 0 5px 5px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.DateTimeGr.ToFarsi() - @day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian()</td>
|
||||
|
||||
|
||||
@if (day.IsAbsent)
|
||||
{
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<span style="width: 38px;display: block;border-radius: 50px;background-color: #737373;color: #fff;">غیبت</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
@* <span style="width: 40px;display: block;border-radius: 50px;background-color: #737373;color: #fff;">غیبت</span> *@
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (string.IsNullOrWhiteSpace(day.LeaveType))
|
||||
{
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate1</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate1</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.StartDate2</td>
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.EndDate2</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<span style="width: 41px; display: block; border-radius: 50px; background-color: #fff; color: #737373;border: 1px solid #737373;">
|
||||
@day.LeaveType
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan="2" style="font-size: 8px; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
@* <span style="width: 80px; display: block; border-radius: 50px; background-color: #fff; color: #737373;border: 1px solid #737373;">
|
||||
مرخصی @day.LeaveType
|
||||
</span> *@
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
}
|
||||
|
||||
<td style="font-size: 8px !important; text-align: center;border-width: 2px 0 2px 2px;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">@day.BreakTimeString</td>
|
||||
<td style="font-size: 8px !important; text-align: center; border-width: 2px 0 2px 2px; border-color: #DDDCDC; border-style: solid;vertical-align: center;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@if (day.IsSliced)
|
||||
{
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; margin: auto;">
|
||||
<circle stroke-width="2" cx="12" cy="12" r="9" stroke="#222222" />
|
||||
<path stroke-width="2" d="M8 12L11 15L16 9" stroke="#222222" stroke-linecap="round" />
|
||||
</svg>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>-</span>
|
||||
}
|
||||
</td>
|
||||
<td style="font-size: 8px;text-align: center;border-width: 2px 0 2px 0;border-color: #DDDCDC;border-style: solid;-webkit-print-color-adjust: exact;print-color-adjust: exact;border-radius: 5px 0 0 5px;">@day.TotalWorkingHours</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="grid-column: span 2 / span 2;padding: 0;">
|
||||
<div style="background-color: #FFFFFF !important; border: 1px solid #CCCCCC;border-radius: 7px; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<table style="width: 100%;">
|
||||
<tbody>
|
||||
|
||||
<tr style="font-size: 12px; border-collapse: separate; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 6px 6px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">موظفی @Model.Month @Model.Year : @Model.TotalMandatoryTimeStr</td>
|
||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات حضور : @Model.TotalPresentTimeStr</td>
|
||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 1px;border-color: #D9D9D9;border-style: solid; border-radius: 0 0px 0px 0; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات استراحت : @Model.TotalBreakTimeStr</td>
|
||||
<td style="font-size: 8px; padding: 5px 3px;border-width: 0 0 0 0px;border-color: #D9D9D9;border-style: solid; border-radius: 6px 0 0 6px; -webkit-print-color-adjust: exact;print-color-adjust: exact; text-align: center;width: 25%;background: #FFFFFF;">ساعات کارکرد : @Model.TotalWorkingTimeStr</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="padding: 0 12px;">
|
||||
<table style="width: 100%;margin: 12px 0 0 0;">
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td style="width: 60%;">
|
||||
@{
|
||||
if (Model.IsLeft)
|
||||
{
|
||||
<span style="float: right; margin-right: 15px; font-size: 11.2px;height: 36px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span> </span>
|
||||
<span>@Model.LastDayOfWork</span><span> </span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span> </span>
|
||||
<span>@Model.LeftWorkDate</span><span> </span>
|
||||
<span>می باشد</span>
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
<td style="width: 40%;">
|
||||
<div style="display: flex; justify-content: end;" class="signSection">
|
||||
<div style="margin-left: 15px; position: relative; width: 80px; border: 1px solid #000; height: 78px; border-radius: 10px;">
|
||||
<span style="border-collapse: separate;background-color: #FFFFFF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;font-size: 12px;margin: -10px 8px 0 0;display: table-caption;padding: 0 4px;white-space: nowrap;">اثر انگشت</span>
|
||||
</div>
|
||||
<div style="position: relative; width: 160px; border: 1px solid #000; height: 78px; border-radius: 10px;">
|
||||
<span style="border-collapse: separate;background-color: #FFFFFF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact;font-size: 12px;margin: -10px 54px 0 0;display: table-caption;padding: 0 4px;">امضاء</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@* <div class="row">
|
||||
<fieldset style="border-radius: 10px 10px 10px 10px; margin: 0px 10px;">
|
||||
<div class="row" style="padding: 10px 0 0px 0;">
|
||||
@{
|
||||
if (Model.IsLeft)
|
||||
{
|
||||
<span style="float: right; margin-right: 15px; font-size: 11.2px;height: 36px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span><span> </span>
|
||||
<span>@Model.LastDayOfWork</span><span> </span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span><span> </span>
|
||||
<span>@Model.LeftWorkDate</span><span> </span>
|
||||
<span>می باشد</span>
|
||||
</span>
|
||||
}
|
||||
}
|
||||
|
||||
</div> *@
|
||||
|
||||
@* <div class="row" style="padding: 0px 14px; font-size: 14px;">
|
||||
<div class="row"> *@
|
||||
@*<div class="col-xs-3"><span>اینجانب <span> </span> <span> </span><span> </span><span style="font-weight: bold">@Model.EmployeeFullName</span> </span></div>
|
||||
<div class="col-xs-3"><span> نام پدر: <span> </span><span> </span> <span> </span><span style="font-weight: bold">@Model.FathersName</span></span></div>
|
||||
<div class="col-xs-3"><span>به کد ملی:<span> </span><span> </span><span style="font-weight: bold">@Model.NationalCode</span> </span></div>
|
||||
<div class="col-xs-3" style="direction: ltr"> متولد: <span> </span><span> </span><span> </span><span> </span><span style="font-weight: bold">@Model.DateOfBirth</span></div>*@
|
||||
@* </div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12" style="font-size: 14px; text-align: justify"> *@
|
||||
@*<span> پـرسنل شـرکت<span> </span><span> </span><span style="font-weight: bold">@Model.WorkshopName</span> </span>
|
||||
<span> </span>
|
||||
<span>به کارفرمایی <span> </span> آقای/خانم/شرکت</span> <span> </span><span> </span>
|
||||
@{
|
||||
foreach (var item in @Model.EmployerList)
|
||||
{
|
||||
<span style="font-weight: bold">@item.EmployerFullName </span> <span>،</span>
|
||||
}
|
||||
}
|
||||
<span> </span><span> </span>
|
||||
<span>مبلغ ............. ریال را بصورت نقدی از کارفرما دریافت نمودم. </span>*@
|
||||
|
||||
|
||||
|
||||
@* </div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div classs="col-xs-12">
|
||||
<div style="float: left;display: flex;position: absolute;left: 26px;bottom: 12px;">
|
||||
<div style="margin-left: 15px; position: relative; width: 80px; border: 1px solid #000; height: 98px; border-radius: 10px;">
|
||||
<span style="position: absolute; top: -9px; right: 50%; transform: translate(50%, 0px); border-collapse: separate;background-color: #FFFFFF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; font-size: 12px;width: 55px;">اثر انگشت</span>
|
||||
</div>
|
||||
<div style="margin-left: 15px; position: relative; width: 160px; border: 1px solid #000; height: 98px; border-radius: 10px;">
|
||||
<span style="position: absolute; top: -9px; right: 50%; transform: translate(50%, 0px); border-collapse: separate;background-color: #FFFFFF !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; font-size: 12px;">امضاء</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
</div> *@
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
||||
|
||||
<input type="hidden" id="shiftWorkval" name="shiftWorkval" value="@Model.CreateWorkingHoursTemp.ShiftWork">
|
||||
|
||||
|
||||
@@ -96,7 +96,8 @@
|
||||
</span>
|
||||
</a>
|
||||
<ul class="sdf1">
|
||||
<li permission="101"><a class="clik" asp-page="/Company/ContractingParties/Index">
|
||||
<li permission="101">
|
||||
<a class="clik" href="https://admin.dad-mehr.ir/">
|
||||
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg" style="width: 7px;margin: 0 6px;">
|
||||
<circle cx="6.5" cy="6.5" r="6.5" fill="white"/>
|
||||
</svg>
|
||||
|
||||
@@ -130,7 +130,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
|
||||
workingHours.WorkshopId = contract.WorkshopIds;
|
||||
workingHours.EmployeeId = contract.EmployeeId;
|
||||
|
||||
result = MandatoryHours(workingHours, workshop.WorkshopHolidayWorking, 0);
|
||||
//result = MandatoryHours(workingHours, workshop.WorkshopHolidayWorking, 0);
|
||||
result = await _rollCallMandatoryApplication.RotatingShiftReport(checkout.WorkshopId, checkout.EmployeeId, checkout.ContractStartGr, checkout.ContractEndGr, workingHours.ShiftWork, false, workingHours, workshop.WorkshopHolidayWorking);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,14 +44,20 @@
|
||||
<div>
|
||||
<button class="stepStatus @(Model.HasRollCallService ? "" : "disable")" id="step-3">گروهبندی حضور و غیاب</button>
|
||||
</div>
|
||||
@if (Model.HasCustomizeCheckoutService)
|
||||
{
|
||||
<div>
|
||||
<button class="stepStatus" id="step-4">فیش حقوقی غیر رسمی</button>
|
||||
</div>
|
||||
}
|
||||
<div>
|
||||
<button class="stepStatus @(Model.HasRollCallService ? "" : "disable")" id="step-4">آپلود عکس حضور و غیاب</button>
|
||||
<button class="stepStatus @(Model.HasRollCallService ? "" : "disable")" id="step-5">آپلود عکس حضور و غیاب</button>
|
||||
</div>
|
||||
<div class="employeePart">
|
||||
<button class="stepStatus" id="step-5">حساب بانکی پرسنل</button>
|
||||
<button class="stepStatus" id="step-6">حساب بانکی پرسنل</button>
|
||||
</div>
|
||||
<div class="employeePart">
|
||||
<button class="stepStatus" id="step-6">آپلود مدارک</button>
|
||||
<button class="stepStatus" id="step-7">آپلود مدارک</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,20 +152,53 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="step4" class="step m-auto">
|
||||
<div class="container p-0 m-0 @(Model.HasRollCallService ? "" : "disable")" id="step-form4">
|
||||
|
||||
@if (Model.HasCustomizeCheckoutService)
|
||||
{
|
||||
<div id="step4" class="step w-100 overflow-y-auto">
|
||||
<div class="container p-0 m-0" id="step-form4">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="tempCheckoutEmployeeSetting">
|
||||
<partial name="Company/Employees/_Partials/TempCheckout" model="@Model" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="stepBtnHolder2">
|
||||
<div class="stepBtnFirst d-flex gap-2 justify-content-center">
|
||||
<button type="button" class="stepBtn" id="prevStep4">مرحله قبل</button>
|
||||
<button type="button" class="stepBtn" id="nextStep4">مرحله بعد</button>
|
||||
</div>
|
||||
<div class="w-100 d-flex gap-2 mt-2 justify-content-center">
|
||||
<button type="button" class="stepBtn cancelButton">انصراف</button>
|
||||
<button type="button" class="stepBtn saveData SaveFullData" id="saveFullData4">
|
||||
<span>ذخیره</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div id="step5" class="step m-auto">
|
||||
<div class="container p-0 m-0 @(Model.HasRollCallService ? "" : "disable")" id="step-form5">
|
||||
<partial name="Company/Employees/_Partials/ModalUploadImagePersonnel" model="@Model"/>
|
||||
</div>
|
||||
<div class="stepBtnHolder3">
|
||||
<div class="stepBtnFirst d-flex gap-2 justify-content-center">
|
||||
<button type="button" class="stepBtn" id="prevStep4">مرحله قبل</button>
|
||||
<button type="button" class="stepBtn" id="prevStep5">مرحله قبل</button>
|
||||
@if (rollCallPath == "/Client/Company/RollCall/EmployeeUploadPicture")
|
||||
{
|
||||
<button type="button" class="stepBtn disable">مرحله بعد</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="button" class="stepBtn" id="nextStep4">مرحله بعد</button>
|
||||
<button type="button" class="stepBtn" id="nextStep5">مرحله بعد</button>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100 d-flex gap-2 mt-2 justify-content-center">
|
||||
@@ -176,7 +215,7 @@
|
||||
|
||||
@if (rollCallPath != "/Client/Company/RollCall/EmployeeUploadPicture")
|
||||
{
|
||||
<div id="step5" class="step w-100 overflow-y-auto">
|
||||
<div id="step6" class="step w-100 overflow-y-auto overflow-x-hidden">
|
||||
<div class="container p-0 m-0" id="step-form5">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -188,8 +227,8 @@
|
||||
</div>
|
||||
<div class="stepBtnHolder2">
|
||||
<div class="stepBtnFirst d-flex gap-2 justify-content-center">
|
||||
<button type="button" class="stepBtn" id="prevStep5">مرحله قبل</button>
|
||||
<button type="button" class="stepBtn" id="nextStep5">مرحله بعد</button>
|
||||
<button type="button" class="stepBtn" id="prevStep6">مرحله قبل</button>
|
||||
<button type="button" class="stepBtn" id="nextStep6">مرحله بعد</button>
|
||||
</div>
|
||||
<div class="w-100 d-flex gap-2 mt-2 justify-content-center">
|
||||
<button type="button" class="stepBtn cancelButton">انصراف</button>
|
||||
@@ -203,8 +242,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="step6" class="step w-100 overflow-y-auto">
|
||||
<div class="container p-0 m-0" id="step-form6">
|
||||
<div id="step7" class="step w-100 overflow-y-auto">
|
||||
<div class="container p-0 m-0" id="step-form7">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="uploadDocument">
|
||||
@@ -215,8 +254,8 @@
|
||||
</div>
|
||||
<div class="stepBtnHolder2">
|
||||
<div class="stepBtnFirst d-flex gap-2 justify-content-center">
|
||||
<button type="button" class="stepBtn" id="prevStep6">مرحله قبل</button>
|
||||
<button type="button" class="stepBtn disable" id="nextStep6">پایان</button>
|
||||
<button type="button" class="stepBtn" id="prevStep7">مرحله قبل</button>
|
||||
<button type="button" class="stepBtn disable" id="nextStep7">پایان</button>
|
||||
</div>
|
||||
<div class="w-100 d-flex gap-2 mt-2 justify-content-center">
|
||||
<button type="button" class="stepBtn cancelButton">انصراف</button>
|
||||
@@ -284,6 +323,8 @@
|
||||
var workshopSettingListAjax = `@Url.Page("/Company/Employees/EmployeeList", "WorkshopSettingList")`; // EmployeeList Handler
|
||||
var workshopSettingListAjaxRollCall = `@Url.Page("/Company/RollCall/EmployeeUploadPicture", "WorkshopSettingList")`; // RollCall Handler
|
||||
var workshopSettingListAjaxHome = `@Url.Page("/Index", "WorkshopSettingList")`; // Home Handler
|
||||
|
||||
var hasCustomizeCheckoutService = `@Model.HasCustomizeCheckoutService`;
|
||||
|
||||
// @* var workshopSettingEmployeeSelecting = @Html.Raw(Json.Serialize(Model.EmployeeSettings)); *@
|
||||
</script>
|
||||
|
||||
@@ -24,257 +24,260 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
[Authorize]
|
||||
[NeedsPermission(SubAccountPermissionHelper.PersonnelListPermissionCode)]
|
||||
public class EmployeeListModel : PageModel
|
||||
{
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly ICustomizeWorkshopSettingsApplication _customizeWorkshopSettingsApplication;
|
||||
private readonly IPersonnelCodeApplication _personnelCodeApplication;
|
||||
private readonly IHttpContextAccessor _contextAccessor;
|
||||
private readonly IBankApplication _bankApplication;
|
||||
private readonly IEmployeeBankInformationApplication _employeeBankInformationApplication;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IJobApplication _jobApplication;
|
||||
{
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly ICustomizeWorkshopSettingsApplication _customizeWorkshopSettingsApplication;
|
||||
private readonly IPersonnelCodeApplication _personnelCodeApplication;
|
||||
private readonly IHttpContextAccessor _contextAccessor;
|
||||
private readonly IBankApplication _bankApplication;
|
||||
private readonly IEmployeeBankInformationApplication _employeeBankInformationApplication;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IJobApplication _jobApplication;
|
||||
private readonly ILeftWorkTempApplication _leftWorkTempApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly long _workshopId;
|
||||
|
||||
public PersonnelInfoViewModel Employees;
|
||||
public bool HasEmployees;
|
||||
public long WorkshopId;
|
||||
public string WorkshopFullName;
|
||||
public EmployeeSearchModel SearchModel;
|
||||
public bool HasEmployees;
|
||||
public long WorkshopId;
|
||||
public string WorkshopFullName;
|
||||
public EmployeeSearchModel SearchModel;
|
||||
|
||||
public EmployeeListModel(IBankApplication bankApplication,IEmployeeBankInformationApplication employeeBankInformationApplication,IEmployeeDocumentsApplication employeeDocumentsApplication,IAuthHelper authHelper,IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication, IPersonnelCodeApplication personnelCodeApplication, IJobApplication jobApplication, ILeftWorkTempApplication leftWorkTempApplication, IRollCallServiceApplication rollCallServiceApplication)
|
||||
{
|
||||
_passwordHasher = passwordHasher;
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_contextAccessor = contextAccessor;
|
||||
_customizeWorkshopSettingsApplication = customizeWorkshopSettingsApplication;
|
||||
_personnelCodeApplication = personnelCodeApplication;
|
||||
_jobApplication = jobApplication;
|
||||
_leftWorkTempApplication = leftWorkTempApplication;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
_authHelper = authHelper;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_employeeBankInformationApplication = employeeBankInformationApplication;
|
||||
_bankApplication = bankApplication;
|
||||
public EmployeeListModel(IBankApplication bankApplication, IEmployeeBankInformationApplication employeeBankInformationApplication, IEmployeeDocumentsApplication employeeDocumentsApplication, IAuthHelper authHelper, IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, ICustomizeWorkshopSettingsApplication customizeWorkshopSettingsApplication, IPersonnelCodeApplication personnelCodeApplication, IJobApplication jobApplication, ILeftWorkTempApplication leftWorkTempApplication, IRollCallServiceApplication rollCallServiceApplication)
|
||||
{
|
||||
_passwordHasher = passwordHasher;
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_contextAccessor = contextAccessor;
|
||||
_customizeWorkshopSettingsApplication = customizeWorkshopSettingsApplication;
|
||||
_personnelCodeApplication = personnelCodeApplication;
|
||||
_jobApplication = jobApplication;
|
||||
_leftWorkTempApplication = leftWorkTempApplication;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
_authHelper = authHelper;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_employeeBankInformationApplication = employeeBankInformationApplication;
|
||||
_bankApplication = bankApplication;
|
||||
|
||||
|
||||
|
||||
var workshopHash = _contextAccessor.HttpContext?.User.FindFirstValue("WorkshopSlug");
|
||||
_workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
var workshopHash = _contextAccessor.HttpContext?.User.FindFirstValue("WorkshopSlug");
|
||||
_workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
|
||||
if (_workshopId < 1)
|
||||
throw new InvalidDataException("اختلال در کارگاه");
|
||||
if (_workshopId < 1)
|
||||
throw new InvalidDataException("اختلال در کارگاه");
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(_workshopId);
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
WorkshopId = workshop.Id;
|
||||
public void OnGet()
|
||||
{
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(_workshopId);
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
WorkshopId = workshop.Id;
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeListAjax(EmployeeSearchModel searchModel)
|
||||
{
|
||||
var personnelSearchModel = new PersonnelInfoSearchModel()
|
||||
{
|
||||
WorkshopId = _workshopId,
|
||||
};
|
||||
public IActionResult OnGetEmployeeListAjax(EmployeeSearchModel searchModel)
|
||||
{
|
||||
var personnelSearchModel = new PersonnelInfoSearchModel()
|
||||
{
|
||||
WorkshopId = _workshopId,
|
||||
};
|
||||
|
||||
var result = _workshopApplication.GetPersonnelInfoRemastered(personnelSearchModel);
|
||||
var result = _workshopApplication.GetPersonnelInfoRemastered(personnelSearchModel);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.EmployeeFullName))
|
||||
result = result.Where(x => x.FullName.Contains(searchModel.EmployeeFullName)).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.EmployeeFullName))
|
||||
result = result.Where(x => x.FullName.Contains(searchModel.EmployeeFullName)).ToList();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.NationalCode))
|
||||
result = result.Where(x => x.NationalCode.Contains(searchModel.NationalCode)).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(searchModel.NationalCode))
|
||||
result = result.Where(x => x.NationalCode.Contains(searchModel.NationalCode)).ToList();
|
||||
|
||||
var resultData = new PersonnelInfoViewModel()
|
||||
{
|
||||
PersonnelInfoViewModels = result.OrderByDescending(x => x.CreatedByClient).ThenByDescending(x => x.LefWorkTemp).ThenBy(x => x.Black ? 1 : 0).ThenBy(x => x.PersonnelCode).ToList(),
|
||||
};
|
||||
var resultData = new PersonnelInfoViewModel()
|
||||
{
|
||||
PersonnelInfoViewModels = result.OrderByDescending(x => x.CreatedByClient).ThenByDescending(x => x.LefWorkTemp).ThenBy(x => x.Black ? 1 : 0).ThenBy(x => x.PersonnelCode).ToList(),
|
||||
};
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetPrintOnePersonnelInfo(long employeeId)
|
||||
{
|
||||
var result = _employeeApplication.GetDetails(employeeId);
|
||||
return Partial("PrintOnePersonnelInfo", result);
|
||||
}
|
||||
public IActionResult OnGetPrintOnePersonnelInfo(long employeeId)
|
||||
{
|
||||
var result = _employeeApplication.GetDetails(employeeId);
|
||||
return Partial("PrintOnePersonnelInfo", result);
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeDataByNationalCode(string nationalCode)
|
||||
{
|
||||
var workshopIds = _workshopApplication.GetWorkshopAccount().Select(workshop => workshop.Id).ToList();
|
||||
public IActionResult OnGetEmployeeDataByNationalCode(string nationalCode)
|
||||
{
|
||||
var workshopIds = _workshopApplication.GetWorkshopAccount().Select(workshop => workshop.Id).ToList();
|
||||
|
||||
var resultData = _employeeApplication.GetEmployeeByNationalCodeIfHasLeftWork(nationalCode, workshopIds);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopSettingList()
|
||||
{
|
||||
var resultData = _customizeWorkshopSettingsApplication.GetWorkshopIncludeGroupsByWorkshopId(_workshopId);
|
||||
if (resultData != null)
|
||||
{
|
||||
resultData.GroupSettings = resultData?.GroupSettings.Where(x => !x.MainGroup).ToList();
|
||||
public IActionResult OnGetWorkshopSettingList()
|
||||
{
|
||||
var resultData = _customizeWorkshopSettingsApplication.GetWorkshopIncludeGroupsByWorkshopId(_workshopId);
|
||||
if (resultData != null)
|
||||
{
|
||||
resultData.GroupSettings = resultData?.GroupSettings.Where(x => !x.MainGroup).ToList();
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateEmployee()
|
||||
{
|
||||
var command = new CreateEmployeeByClient();
|
||||
command.PersonnelCode = (_personnelCodeApplication.GetLastPersonnelCodeByWorkshop(_workshopId) + 1).ToString();
|
||||
command.HasRollCallService = _rollCallServiceApplication.IsExistActiveServiceByWorkshopId(_workshopId);
|
||||
var activeServiceByWorkshopId = _rollCallServiceApplication.GetActiveServiceByWorkshopId(_workshopId);
|
||||
command.HasRollCallService = activeServiceByWorkshopId is { Id: > 0 };
|
||||
if (command.HasRollCallService)
|
||||
command.HasCustomizeCheckoutService = activeServiceByWorkshopId.HasCustomizeCheckoutService == "true";
|
||||
return Partial("CreateEmployeeModal", command);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateEmployee(CreateEmployeeByClient command)
|
||||
{
|
||||
command.WorkshopId = _workshopId;
|
||||
{
|
||||
command.WorkshopId = _workshopId;
|
||||
var result = _employeeApplication.CreateEmployeeByClient(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetEmployeeDetailsWithNationalCode(string nationalCode,string birthDate)
|
||||
{
|
||||
public async Task<IActionResult> OnGetEmployeeDetailsWithNationalCode(string nationalCode, string birthDate)
|
||||
{
|
||||
var result = await _employeeApplication.ValidateCreateEmployeeClientByNationalCodeAndWorkshopId(nationalCode, birthDate, _workshopId);
|
||||
return new JsonResult(result);
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetJobSearch(string jobName)
|
||||
{
|
||||
var jobViewModels = _jobApplication.GetJobListByText(jobName);
|
||||
public IActionResult OnGetJobSearch(string jobName)
|
||||
{
|
||||
var jobViewModels = _jobApplication.GetJobListByText(jobName);
|
||||
|
||||
return new JsonResult(jobViewModels);
|
||||
}
|
||||
return new JsonResult(jobViewModels);
|
||||
}
|
||||
|
||||
//step 4
|
||||
public IActionResult OnGetDetailsAjax(long employeeId)
|
||||
{
|
||||
var resultData = _employeeBankInformationApplication.GetByEmployeeId(_workshopId, employeeId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData
|
||||
});
|
||||
}
|
||||
//public IActionResult OnPostCreate(CreateEmployeeInformation command)
|
||||
//{
|
||||
// command.WorkshopId = _workshopId;
|
||||
// if (!string.IsNullOrWhiteSpace(command.CardNumber))
|
||||
// command.CardNumber = command.CardNumber.Replace("-", "");
|
||||
//step 4
|
||||
public IActionResult OnGetDetailsAjax(long employeeId)
|
||||
{
|
||||
var resultData = _employeeBankInformationApplication.GetByEmployeeId(_workshopId, employeeId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData
|
||||
});
|
||||
}
|
||||
//public IActionResult OnPostCreate(CreateEmployeeInformation command)
|
||||
//{
|
||||
// command.WorkshopId = _workshopId;
|
||||
// if (!string.IsNullOrWhiteSpace(command.CardNumber))
|
||||
// command.CardNumber = command.CardNumber.Replace("-", "");
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(command.ShebaNumber))
|
||||
// command.ShebaNumber = command.ShebaNumber.Replace("-", "");
|
||||
// if (!string.IsNullOrWhiteSpace(command.ShebaNumber))
|
||||
// command.ShebaNumber = command.ShebaNumber.Replace("-", "");
|
||||
|
||||
// var result = _employeeBankInformationApplication.Create(command);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// id = result.SendId
|
||||
// });
|
||||
//}
|
||||
//public IActionResult OnPostDelete(long id)
|
||||
//{
|
||||
// var result = _employeeBankInformationApplication.Remove(id);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// });
|
||||
//}
|
||||
// var result = _employeeBankInformationApplication.Create(command);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// id = result.SendId
|
||||
// });
|
||||
//}
|
||||
//public IActionResult OnPostDelete(long id)
|
||||
//{
|
||||
// var result = _employeeBankInformationApplication.Remove(id);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// });
|
||||
//}
|
||||
|
||||
public IActionResult OnGetBankListAjax()
|
||||
{
|
||||
var resultData = _bankApplication.Search("");
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetBankListAjax()
|
||||
{
|
||||
var resultData = _bankApplication.Search("");
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
});
|
||||
}
|
||||
|
||||
//public IActionResult OnPostGroupCreate(List<CreateEmployeeInformation> command)
|
||||
//{
|
||||
// var result = _employeeBankInformationApplication.GroupCreate(_workshopId, command);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// id = result.SendId
|
||||
// });
|
||||
//}
|
||||
//public IActionResult OnPostGroupCreate(List<CreateEmployeeInformation> command)
|
||||
//{
|
||||
// var result = _employeeBankInformationApplication.GroupCreate(_workshopId, command);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// id = result.SendId
|
||||
// });
|
||||
//}
|
||||
|
||||
//step 5
|
||||
public IActionResult OnPostCreateUploadDocument(AddEmployeeDocumentItem command)
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
if (workshopId <= 0)
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "کارگاهی یافت نشد",
|
||||
});
|
||||
command.WorkshopId = workshopId;
|
||||
//step 5
|
||||
public IActionResult OnPostCreateUploadDocument(AddEmployeeDocumentItem command)
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
if (workshopId <= 0)
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "کارگاهی یافت نشد",
|
||||
});
|
||||
command.WorkshopId = workshopId;
|
||||
|
||||
|
||||
var result = _employeeDocumentsApplication.AddEmployeeDocumentItemForClient(command);
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForClient(command.EmployeeId, workshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
imageSrc = employeeDocument
|
||||
});
|
||||
}
|
||||
|
||||
//public IActionResult OnPostSaveSubmit(SubmitEmployeeDocuments cmd)
|
||||
//{
|
||||
// var result = _employeeDocumentsApplication.SubmitDocumentItemsByClient(cmd);
|
||||
var result = _employeeDocumentsApplication.AddEmployeeDocumentItemForClient(command);
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForClient(command.EmployeeId, workshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
imageSrc = employeeDocument
|
||||
});
|
||||
}
|
||||
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccedded = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// });
|
||||
//}
|
||||
//public IActionResult OnPostSaveSubmit(SubmitEmployeeDocuments cmd)
|
||||
//{
|
||||
// var result = _employeeDocumentsApplication.SubmitDocumentItemsByClient(cmd);
|
||||
|
||||
//public IActionResult OnPostRemoveEmployeeDocumentByLabel(long employeeId, DocumentItemLabel label)
|
||||
//{
|
||||
// var workshopId = _passwordHasher.SlugDecrypt(_authHelper.GetWorkshopSlug());
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccedded = result.IsSuccedded,
|
||||
// message = result.Message,
|
||||
// });
|
||||
//}
|
||||
|
||||
// var result = _employeeDocumentsApplication.DeleteEmployeeMultipleUnsubmittedDocumentsByLabel(workshopId, employeeId,
|
||||
// label);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccedded = result.IsSuccedded,
|
||||
// message = result.Message
|
||||
// });
|
||||
//}
|
||||
//public IActionResult OnPostRemoveEmployeeDocumentByLabel(long employeeId, DocumentItemLabel label)
|
||||
//{
|
||||
// var workshopId = _passwordHasher.SlugDecrypt(_authHelper.GetWorkshopSlug());
|
||||
|
||||
// var result = _employeeDocumentsApplication.DeleteEmployeeMultipleUnsubmittedDocumentsByLabel(workshopId, employeeId,
|
||||
// label);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
// isSuccedded = result.IsSuccedded,
|
||||
// message = result.Message
|
||||
// });
|
||||
//}
|
||||
|
||||
#region Left Work
|
||||
public IActionResult OnGetCreateLeftWorkEmployee()
|
||||
@@ -282,7 +285,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
var command = new CreateLeftWorkTemp();
|
||||
return Partial("ModalCreateLeftWorkEmployee", command);
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> OnGetEmployeeList()
|
||||
{
|
||||
var employees = await _employeeApplication.WorkedEmployeesInWorkshopSelectList(_workshopId);
|
||||
@@ -293,13 +296,12 @@ namespace ServiceHost.Areas.Client.Pages.Company.Employees
|
||||
data = employees
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetEmployeeListLeftWorkTemp()
|
||||
{
|
||||
var exists = _leftWorkTempApplication.GetLeftWorksByWorkshopId(_workshopId);
|
||||
|
||||
var employees = (await _employeeApplication.WorkedEmployeesInWorkshopSelectList(_workshopId))
|
||||
.Where(x=> exists.All(a => a.EmployeeId != x.Id)).ToList();
|
||||
.Where(x => exists.All(a => a.EmployeeId != x.Id)).ToList();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
@model CompanyManagment.App.Contracts.Employee.CreateEmployeeByClient
|
||||
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/pages/employees/css/createbankinfomodal.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.disableColor {
|
||||
border: 1px solid #C6C6C6 !important;
|
||||
background-color: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.msgStepTempCheckout {
|
||||
border: 1px solid #C6C6C6;
|
||||
border-radius: 9px;
|
||||
width: 60%;
|
||||
margin: 35px auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
@*
|
||||
<div class="text-center">
|
||||
<div>
|
||||
<p class="m-0 pdHeaderTitle1">ایجاد شماره حساب پرسنل</p>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 my-1">
|
||||
<span class="spanTitleText">نام گروه</span>
|
||||
<input type="text" class="form-control text-center disable disableColor" id="groupNameTemp" placeholder="-" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-1">
|
||||
<span class="spanTitleText">حقوق تعیین شده در این گروه</span>
|
||||
<input type="text" class="form-control text-center disable disableColor" id="priceTemp" placeholder="-" style="direction: ltr;">
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-1 position-relative">
|
||||
<span class="spanTitleText">مرخصی مجاز تعیین شده در این گروه</span>
|
||||
<input class="form-control text-center disable disableColor" id="leavePermitted" placeholder="-" style="direction: ltr;" />
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-1 position-relative">
|
||||
<span class="spanTitleText">حقوق پرسنل</span>
|
||||
<input class="form-control text-center disable disableColor" id="personnelSalary" name="Command.CreateCustomizeEmployeeSettings.Salary" placeholder="-" style="direction: ltr" />
|
||||
</div>
|
||||
<div class="col-12 my-1 position-relative">
|
||||
<span class="spanTitleText">مجاز مرخصی</span>
|
||||
<input class="form-control text-center disable disableColor" id="leavePermittedDays" name="Command.CreateCustomizeEmployeeSettings.LeavePermittedDays" placeholder="-" style="direction: ltr" />
|
||||
</div>
|
||||
|
||||
<div class="col-12 my-1 position-relative" id="has-group" style="display: block;">
|
||||
<div class="text-center p-4 msgStepTempCheckout">
|
||||
<span class="spanTitleText">به دلیل عدم انتخاب گروهبندی حضور و غیاب، امکان ثبت حقوق برای پرسنل وجود ندارد.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// var getDetailsAjaxUrl = `@Url.Page("/Company/Employees/EmployeeList", "DetailsAjax")`;
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/employees/js/TempCheckout.js?ver=@clientVersion"></script>
|
||||
@@ -734,6 +734,10 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
var command = new CreateEmployeeByClient();
|
||||
command.PersonnelCode = (_personnelCodeApplication.GetLastPersonnelCodeByWorkshop(_workshopId) + 1).ToString();
|
||||
command.HasRollCallService = _rollCallServiceApplication.IsExistActiveServiceByWorkshopId(_workshopId);
|
||||
var activeServiceByWorkshopId = _rollCallServiceApplication.GetActiveServiceByWorkshopId(_workshopId);
|
||||
command.HasRollCallService = activeServiceByWorkshopId is { Id: > 0 };
|
||||
if (command.HasRollCallService)
|
||||
command.HasCustomizeCheckoutService = activeServiceByWorkshopId.HasCustomizeCheckoutService == "true";
|
||||
return Partial("../Employees/CreateEmployeeModal", command);
|
||||
}
|
||||
|
||||
|
||||
@@ -558,7 +558,10 @@ namespace ServiceHost.Areas.Client.Pages
|
||||
long workshopIDecrypt = _passwordHasher.SlugDecrypt(workshopSlug);
|
||||
var command = new CreateEmployeeByClient();
|
||||
command.PersonnelCode = (_personnelCodeApplication.GetLastPersonnelCodeByWorkshop(workshopIDecrypt) + 1).ToString();
|
||||
command.HasRollCallService = _rollCallServiceApplication.IsExistActiveServiceByWorkshopId(workshopIDecrypt);
|
||||
var activeServiceByWorkshopId = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopIDecrypt);
|
||||
command.HasRollCallService = activeServiceByWorkshopId is { Id: > 0 };
|
||||
if (command.HasRollCallService)
|
||||
command.HasCustomizeCheckoutService = activeServiceByWorkshopId.HasCustomizeCheckoutService == "true";
|
||||
return Partial("./Company/Employees/CreateEmployeeModal", command);
|
||||
}
|
||||
|
||||
|
||||
12
ServiceHost/BaseControllers/AdminController.cs
Normal file
12
ServiceHost/BaseControllers/AdminController.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
namespace ServiceHost.BaseControllers;
|
||||
|
||||
[Authorize(Policy = "AdminArea")]
|
||||
[Area("Admin")]
|
||||
[ApiExplorerSettings(GroupName = "Admin")]
|
||||
[Route("api/[area]/[controller]")]
|
||||
public class AdminController:ControllerBase
|
||||
{
|
||||
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,534 +1,30 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Sms;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using AccountManagement.Domain.AccountAgg;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.Claims;
|
||||
using _0_Framework.Application.UID;
|
||||
using AccountManagement.Application.Contracts.CameraAccount;
|
||||
using CompanyManagment.EFCore;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using Company.Domain.ReportAgg;
|
||||
using Company.Domain.RollCallAgg;
|
||||
using Company.Domain.RollCallAgg.DomainService;
|
||||
using Company.Domain.YearlySalaryAgg;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using CompanyManagment.App.Contracts.File1;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using IUidService = _0_Framework.Application.UID.IUidService;
|
||||
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
|
||||
namespace ServiceHost.Pages
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
|
||||
public string Mess { get; set; }
|
||||
[BindProperty]
|
||||
public string Username { get; set; }
|
||||
[BindProperty]
|
||||
public string Password { get; set; }
|
||||
[BindProperty]
|
||||
public string CaptchaResponse { get; set; }
|
||||
|
||||
public bool HasApkToDownload { get; set; }
|
||||
|
||||
private static Timer aTimer;
|
||||
public Login login;
|
||||
public AccountViewModel Search;
|
||||
private readonly ILogger<IndexModel> _logger;
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
private readonly IGoogleRecaptcha _googleRecaptcha;
|
||||
private readonly ISmsService _smsService;
|
||||
private readonly IWorker _worker;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly ICameraAccountApplication _cameraAccountApplication;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
||||
private readonly ITemporaryClientRegistrationApplication _clientRegistrationApplication;
|
||||
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
||||
private readonly IEmployeeComputeOptionsRepository _computeOptions;
|
||||
private readonly IFileApplication _fileApplication;
|
||||
|
||||
|
||||
|
||||
|
||||
public IndexModel(ILogger<IndexModel> logger, IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha, ISmsService smsService, IWorker worker,
|
||||
IAuthHelper authHelper, ICameraAccountApplication cameraAccountApplication, IWebHostEnvironment webHostEnvironment,
|
||||
IAndroidApkVersionApplication androidApkVersionApplication, ITemporaryClientRegistrationApplication clientRegistrationApplication, IYearlySalaryRepository yearlySalaryRepository, IEmployeeComputeOptionsRepository computeOptions, IFileApplication fileApplication)
|
||||
{
|
||||
_logger = logger;
|
||||
_accountApplication = accountApplication;
|
||||
_googleRecaptcha = googleRecaptcha;
|
||||
_smsService = smsService;
|
||||
_worker = worker;
|
||||
_authHelper = authHelper;
|
||||
_cameraAccountApplication = cameraAccountApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
_clientRegistrationApplication = clientRegistrationApplication;
|
||||
_yearlySalaryRepository = yearlySalaryRepository;
|
||||
_computeOptions = computeOptions;
|
||||
_fileApplication = fileApplication;
|
||||
public IndexModel(IAuthHelper authHelper, IAccountApplication accountApplication)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_accountApplication = accountApplication;
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGet()
|
||||
public void OnGet()
|
||||
{
|
||||
//اصلاحات محاسبه عیدی در فیش حقوقی
|
||||
// _computeOptions.GetAllByWorkshopId(170);
|
||||
//اصلاحات محاصبه پایه سنوات در فیش حقوقی
|
||||
//_yearlySalaryRepository.TestDayliFeeCompute();
|
||||
bool ex = false;
|
||||
//while (!ex)
|
||||
//{
|
||||
// Console.WriteLine("enter National code ... ");
|
||||
// var nationalCode = Console.ReadLine();
|
||||
// Console.WriteLine("enter DateOfBirth ... ");
|
||||
// var dateOfBirth = Console.ReadLine();
|
||||
// Console.WriteLine("enter phoneNumber ... ");
|
||||
// var phone = Console.ReadLine();
|
||||
// var res = await _clientRegistrationApplication.CreateContractingPartyTemp(nationalCode, dateOfBirth,
|
||||
// phone);
|
||||
// if (res.IsSuccedded)
|
||||
// {
|
||||
// var updateAddress =await
|
||||
// _clientRegistrationApplication.UpdateAddress(res.Data.Id, "gilan", "rasht", "hajiabad");
|
||||
// if (updateAddress.IsSuccedded)
|
||||
// {
|
||||
// var workshopSelected = _clientRegistrationApplication.GetWorkshopTemp(res.Data.Id).GetAwaiter().GetResult();
|
||||
// if (workshopSelected.Count > 0)
|
||||
// {
|
||||
// var result = await
|
||||
// _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id, "12",
|
||||
// "OneTime");
|
||||
// Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble);
|
||||
// Console.WriteLine("TotalPaymentDouble : " + result.TotalPaymentDouble);
|
||||
// var createInstitutionContract = await
|
||||
// _clientRegistrationApplication.CreateOrUpdateInstitutionContractTemp(res.Data.Id, null,
|
||||
// null, result.TotalPaymentDouble, 0);
|
||||
// if (createInstitutionContract.IsSuccedded)
|
||||
// {
|
||||
// var sendVerfyCode =await _clientRegistrationApplication.ReceivedCodeFromServer(res.Data.Id);
|
||||
// if (sendVerfyCode.IsSuccedded)
|
||||
// {
|
||||
// Console.WriteLine("enter the code ... ");
|
||||
// var codeReceived = Console.ReadLine();
|
||||
}
|
||||
|
||||
// var completeSms = await
|
||||
// _clientRegistrationApplication.CheckVerifyCodeIsTrue(res.Data.Id, codeReceived);
|
||||
// if (completeSms.IsSuccedded)
|
||||
// {
|
||||
// var payOffCompleted =
|
||||
// await _clientRegistrationApplication.PayOffCompleted(res.Data.Id);
|
||||
// if (payOffCompleted.IsSuccedded)
|
||||
// {
|
||||
// Console.WriteLine("finaly completed");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine(payOffCompleted.Message);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var workshops = new List<WorkshopTempViewModel>();
|
||||
// workshops.Add(new WorkshopTempViewModel
|
||||
// {
|
||||
// ContractAndCheckout = true,
|
||||
// ContractingPartyTempId = res.Data.Id,
|
||||
// CountPerson = 10,
|
||||
// CustomizeCheckout = true,
|
||||
// Insurance = true,
|
||||
// RollCall = true,
|
||||
// WorkshopName = "dadmehr",
|
||||
|
||||
// });
|
||||
// workshops.Add(new WorkshopTempViewModel
|
||||
// {
|
||||
// ContractAndCheckout = true,
|
||||
// ContractingPartyTempId = res.Data.Id,
|
||||
// CountPerson = 20,
|
||||
// CustomizeCheckout = true,
|
||||
// Insurance = true,
|
||||
// RollCall = true,
|
||||
// WorkshopName = "kababMahdi",
|
||||
|
||||
// });
|
||||
// var creteWorkshops = _clientRegistrationApplication.CreateOrUpdateWorkshopTemp(workshops)
|
||||
// .GetAwaiter().GetResult();
|
||||
|
||||
// if (creteWorkshops.IsSuccedded)
|
||||
// {
|
||||
// var result = _clientRegistrationApplication.GetTotalPaymentAndWorkshopList(res.Data.Id).GetAwaiter().GetResult();
|
||||
// Console.WriteLine("sumOfWorkshopPayment : " + result.SumOfWorkshopsPaymentDouble);
|
||||
// Console.WriteLine("TotalPaymentDouble : " + result.TotalPaymentDouble);
|
||||
|
||||
// var createInstitutionContract = await
|
||||
// _clientRegistrationApplication.CreateOrUpdateInstitutionContractTemp(res.Data.Id, null,
|
||||
// null, result.TotalPaymentDouble, 0);
|
||||
// if (createInstitutionContract.IsSuccedded)
|
||||
// {
|
||||
// var sendVerfyCode = await _clientRegistrationApplication.ReceivedCodeFromServer(res.Data.Id);
|
||||
// if (sendVerfyCode.IsSuccedded)
|
||||
// {
|
||||
// Console.WriteLine("enter the code ... ");
|
||||
// var codeReceived = Console.ReadLine();
|
||||
|
||||
// var completeSms = await
|
||||
// _clientRegistrationApplication.CheckVerifyCodeIsTrue(res.Data.Id, codeReceived);
|
||||
// if (completeSms.IsSuccedded)
|
||||
// {
|
||||
// var payOffCompleted =
|
||||
// await _clientRegistrationApplication.PayOffCompleted(res.Data.Id);
|
||||
// if (payOffCompleted.IsSuccedded)
|
||||
// {
|
||||
// Console.WriteLine("finaly completed");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine(payOffCompleted.Message);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
// Console.WriteLine("do you want to exit ... ");
|
||||
// var exitCheck = Console.ReadLine();
|
||||
// if (exitCheck == "y")
|
||||
// ex = true;
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// while (!ex)
|
||||
// {
|
||||
// var onGet = _institutionPlanApplication.GetByFirst();
|
||||
// Console.WriteLine("enter ContractAndCheckoutInPersonPercent ... " + onGet.ContractAndCheckoutInPersonPercent);
|
||||
// var ContractAndCheckoutInPersonPercent = Console.ReadLine();
|
||||
// Console.WriteLine("enter ContractAndCheckoutPercent ... " + onGet.ContractAndCheckoutPercent);
|
||||
// var ContractAndCheckoutPercent = Console.ReadLine();
|
||||
|
||||
// Console.WriteLine("enter InsurancePercent ... " + onGet.InsurancePercent);
|
||||
// var InsurancePercent = Console.ReadLine();
|
||||
// Console.WriteLine("enter InsuranceInPersonPercent ... " + onGet.InsuranceInPersonPercent);
|
||||
// var InsuranceInPersonPercent = Console.ReadLine();
|
||||
|
||||
// Console.WriteLine("enter CustomizeCheckoutPercent ... " + onGet.CustomizeCheckoutPercent);
|
||||
// var CustomizeCheckoutPercent = Console.ReadLine();
|
||||
// Console.WriteLine("enter RollCallPercent ... " + onGet.RollCallPercent);
|
||||
// var RollCallPercent = Console.ReadLine();
|
||||
// //var res = _institutionPlanApplication.GetInstitutionPlanList(Convert.ToInt32(pageIndex),
|
||||
// // Convert.ToInt32(countPerson));
|
||||
|
||||
// var res = _institutionPlanApplication.CreateInstitutionPlanPercentage(new CreateInstitutionPlanPercentage()
|
||||
// {
|
||||
// ContractAndCheckoutInPersonPercentStr = ContractAndCheckoutInPersonPercent,
|
||||
// ContractAndCheckoutPercentStr = ContractAndCheckoutPercent,
|
||||
// InsurancePercentStr = InsurancePercent,
|
||||
// InsuranceInPersonPercentStr = InsuranceInPersonPercent,
|
||||
// CustomizeCheckoutPercentStr = CustomizeCheckoutPercent,
|
||||
// RollCallPercentStr = RollCallPercent
|
||||
// });
|
||||
|
||||
// Console.WriteLine("do you want to exit ... ");
|
||||
// var exitCheck = Console.ReadLine();
|
||||
// if (exitCheck == "y")
|
||||
// ex = true;
|
||||
//}
|
||||
// _reportRepository.GetAllActiveWorkshopsNew("1403", "12");
|
||||
|
||||
//var test = _uidService.GetPersonalInfo("2669318622", "1363/02/25");
|
||||
HasApkToDownload = _androidApkVersionApplication.HasAndroidApkToDownload();
|
||||
if (User.Identity is { IsAuthenticated: true })
|
||||
{
|
||||
if (User.FindFirstValue("IsCamera") == "true")
|
||||
{
|
||||
return Redirect("/Camera");
|
||||
}
|
||||
else if ((User.FindFirstValue("ClientAriaPermission") == "true") && (User.FindFirstValue("AdminAreaPermission") == "false"))
|
||||
{
|
||||
return Redirect("/Client");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("/Admin");
|
||||
}
|
||||
}
|
||||
_authHelper.SignOut();
|
||||
return Page();
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnPostLogin(Login command)
|
||||
{
|
||||
|
||||
var result = _accountApplication.Login(command);
|
||||
if (result.IsSuccedded)
|
||||
return RedirectToPage("/Admin");
|
||||
|
||||
|
||||
ModelState.AddModelError("Username", "اطلاعات وارد شده اشتباه است");
|
||||
TempData["h"] = "n";
|
||||
Mess = result.Message;
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostEnter(Login command)
|
||||
public IActionResult OnGetLogout()
|
||||
{
|
||||
|
||||
bool captchaResult = true;
|
||||
//if (!_webHostEnvironment.IsDevelopment())
|
||||
// captchaResult = _googleRecaptcha.IsSatisfy(CaptchaResponse).Result;
|
||||
|
||||
|
||||
if (captchaResult)
|
||||
{
|
||||
var result = _accountApplication.Login(command);
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
switch (result.SendId)
|
||||
{
|
||||
case 1:
|
||||
return Redirect("/Admin");
|
||||
break;
|
||||
case 2:
|
||||
return Redirect("/Client");
|
||||
break;
|
||||
case 3:
|
||||
return Redirect("/Camera");
|
||||
//return
|
||||
// var verfiyResult = _accountApplication.GetByVerifyCode(code);
|
||||
break;
|
||||
case 0:
|
||||
result.Message = "امکان ورود با این حساب کاربری وجود ندارد";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Mess = result.Message;
|
||||
}
|
||||
else
|
||||
{
|
||||
Mess = "دستگاه شما ربات تشخیص داده شد";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//ModelState.AddModelError("Username", "اطلاعات وارد شده اشتباه است");
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<JsonResult> OnPostCheckCaptcha(string response)
|
||||
{
|
||||
var result = await _googleRecaptcha.IsSatisfy(response);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isNotRobot = result,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRegisterClient(string name, string user, string pass, string phone, string nationalcode)
|
||||
{
|
||||
var command = new RegisterAccount()
|
||||
{
|
||||
Fullname = name,
|
||||
Username = user,
|
||||
Password = pass,
|
||||
Mobile = phone,
|
||||
NationalCode = nationalcode,
|
||||
};
|
||||
var result = _accountApplication.RegisterClient(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSucceded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetLogout()
|
||||
{
|
||||
_accountApplication.Logout();
|
||||
return RedirectToPage("/Index");
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> OnPostCheckPhoneValid(string phone)
|
||||
{
|
||||
var result = _accountApplication.Search(new AccountSearchModel() { Mobile = phone }).FirstOrDefault();
|
||||
if (result == null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
SendSms(phone);
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void SendSms(string phone)
|
||||
{
|
||||
|
||||
var result = _accountApplication.Search(new AccountSearchModel() { Mobile = phone }).FirstOrDefault();
|
||||
if (result != null)
|
||||
{
|
||||
_accountApplication.SetVerifyCode(phone, result.Id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostWithMobile(string code, string phone)
|
||||
{
|
||||
//bool captchaResult = true;
|
||||
//if (!_webHostEnvironment.IsDevelopment())
|
||||
// captchaResult = _googleRecaptcha.IsSatisfy(CaptchaResponse).Result;
|
||||
//if (captchaResult)
|
||||
//{
|
||||
var verfiyResult = _accountApplication.GetByVerifyCode(code, phone);
|
||||
if (verfiyResult != null)
|
||||
{
|
||||
|
||||
var result = _accountApplication.LoginWithMobile(verfiyResult.Id);
|
||||
if (result.IsSuccedded && result.SendId == 1)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
url = "/Admin",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (result.IsSuccedded && result.SendId == 2)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
url = "/Client",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Mess = "دستگاه شما ربات تشخیص داده شد";
|
||||
//}
|
||||
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
|
||||
}
|
||||
public IActionResult OnPostVerify(string code, string phone)
|
||||
{
|
||||
var result = _accountApplication.GetByVerifyCode(code, phone);
|
||||
if (result != null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
user = result.Username,
|
||||
verfyId = result.Id
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostChangePass(long id, string username, string newpass)
|
||||
{
|
||||
var result = _accountApplication.GetByUserNameAndId(id, username);
|
||||
if (result != null)
|
||||
{
|
||||
var command = new ChangePassword()
|
||||
{
|
||||
Id = id,
|
||||
Password = newpass,
|
||||
RePassword = newpass
|
||||
};
|
||||
var finalResult = _accountApplication.ChangePassword(command);
|
||||
if (finalResult.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
changed = true
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
changed = false
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
changed = false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class RecaptchaResponse
|
||||
{
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
|
||||
[JsonProperty("challenge_ts")]
|
||||
public DateTimeOffset ChallengeTs { get; set; }
|
||||
|
||||
[JsonProperty("hostname")]
|
||||
public string HostName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
_accountApplication.Logout();
|
||||
return RedirectToPage("/Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
341
ServiceHost/Pages/Register/Index.cshtml
Normal file
341
ServiceHost/Pages/Register/Index.cshtml
Normal file
File diff suppressed because one or more lines are too long
142
ServiceHost/Pages/Register/Index.cshtml.cs
Normal file
142
ServiceHost/Pages/Register/Index.cshtml.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Mono.TextTemplating;
|
||||
using PersianTools.Core;
|
||||
using System.Net;
|
||||
|
||||
namespace ServiceHost.Pages.register
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly ITemporaryClientRegistrationApplication _temporaryClientRegistrationApplication;
|
||||
|
||||
public IndexModel(ITemporaryClientRegistrationApplication temporaryClientRegistrationApplication)
|
||||
{
|
||||
_temporaryClientRegistrationApplication = temporaryClientRegistrationApplication;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostCreateContractingPartyTemp(string nationalCode, string birthDate, string mobile)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.CreateContractingPartyTemp(nationalCode, birthDate, mobile);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
data = result.Data,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostUpdateAddress(long id, string state, string city, string address)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.UpdateAddress(id, state, city, address);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostCreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command, long contractingPartyTempId)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.CreateOrUpdateWorkshopTemp(command, contractingPartyTempId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetInstitutionPlanForWorkshop(WorkshopTempViewModel workshopTemp)
|
||||
{
|
||||
var result = _temporaryClientRegistrationApplication.GetInstitutionPlanForWorkshop(workshopTemp);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
data = result,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetTotalPaymentAndWorkshopList(long contractingPartyTempId, string periodModel = "12", string paymentModel = "OneTime", string contractStartType = "currentMonth")
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.GetTotalPaymentAndWorkshopList(contractingPartyTempId, periodModel, paymentModel, contractStartType);
|
||||
return new JsonResult(new
|
||||
{
|
||||
data = result,
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetCreateOrUpdatePeriodTemp(List<WorkshopTempViewModel> command,long contractingPartyTempId)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.CreateOrUpdateWorkshopTemp(command, contractingPartyTempId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> OnPostCreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax, DateTime contractStart)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.CreateOrUpdateInstitutionContractTemp(contractingPartyTempId, periodModel, paymentModel, totalPayment, valueAddedTax, contractStart);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetWorkshopTemp(long contractingPartyId)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.GetWorkshopTemp(contractingPartyId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
data = result,
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostPayOffCompleted(long contractingPartyId)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.PayOffCompleted(contractingPartyId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostReceivedCodeFromServer(long contractingPartyId)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.ReceivedCodeFromServer(contractingPartyId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostCheckVerifyCodeIsTrue(long contractingPartyTempId, string verifyCode)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.CheckVerifyCodeIsTrue(contractingPartyTempId, verifyCode);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
74
ServiceHost/Pages/Register/_Partials/_Step1.cshtml
Normal file
74
ServiceHost/Pages/Register/_Partials/_Step1.cshtml
Normal file
@@ -0,0 +1,74 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
}
|
||||
|
||||
<link href="~/assetsclient/pages/register/css/_partials/_step1.css" rel="stylesheet" />
|
||||
|
||||
<div class="row p-0">
|
||||
<div class="text-center mb-5">
|
||||
<svg id="logoSvg" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 621.6 721.91">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: url(#linear-gradient-2);
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: url(#linear-gradient-3);
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: url(#linear-gradient);
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#30c1c1"/>
|
||||
<stop offset="1" stop-color="#087474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linear-gradient-2" x1="217.07" y1="187.47" x2="523.83" y2="187.47" xlink:href="#linear-gradient"/>
|
||||
<linearGradient id="linear-gradient-3" x1="1.3" y1="146.6" x2="395.56" y2="146.6" xlink:href="#linear-gradient"/>
|
||||
</defs>
|
||||
<polygon class="cls-3" points="0 328.82 129.91 244.95 129.91 453.87 310.8 562.4 488.4 453.87 488.4 355.2 310.8 355.2 488.4 241.73 621.6 241.73 621.6 541.02 310.8 721.91 0 541.02 0 328.82"/>
|
||||
<polygon class="cls-1" points="217.07 309.16 217.07 192.4 426.8 65.78 523.83 123.33 217.07 309.16"/>
|
||||
<polyline class="cls-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">کد ملی</span>
|
||||
<input type="text" class="form-control text-center" id="nationalCode" placeholder="کد ملی را وارد کنید" style="direction: ltr">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">تاریخ تولد</span>
|
||||
<input type="text" class="form-control text-center" id="birthdate" placeholder="تاریخ تولد را وارد کنید" style="direction: ltr">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">شماره موبایل</span>
|
||||
<input type="text" class="form-control text-center" id="phoneNumber" placeholder="شماره موبایل را وارد کنید" style="direction: ltr">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center mx-auto">
|
||||
<button type="button" class="btnEnter position-relative d-block stepBtn" id="btnGetUidInfo">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<span>احراز هویت</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@* <script>
|
||||
//Job Load
|
||||
var jobsLoadEmployeeAjaxUrl = `@Url.Page("/Company/Employees/EmployeeList", "JobSearch")`;
|
||||
var jobsLoadRollCallAjaxUrl = `@Url.Page("/Company/RollCall/EmployeeUploadPicture", "JobSearch")`;
|
||||
|
||||
//get Employee Data By NationalCode
|
||||
var getEmployeeDataByNationalCodeUrl = `@Url.Page("/Company/Employees/EmployeeList", "EmployeeDetailsWithNationalCode")`;
|
||||
var getRollCallDataByNationalCodeUrl = `@Url.Page("/Company/RollCall/EmployeeUploadPicture", "EmployeeDetailsWithNationalCode")`;
|
||||
|
||||
</script>*@
|
||||
<script src="~/assetsclient/pages/Register/js/_Partials/_Step1.js?ver=@clientVersion"></script>
|
||||
121
ServiceHost/Pages/Register/_Partials/_Step2.cshtml
Normal file
121
ServiceHost/Pages/Register/_Partials/_Step2.cshtml
Normal file
@@ -0,0 +1,121 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
}
|
||||
|
||||
<div class="row p-0">
|
||||
<input type="hidden" class="form-control text-center" id="contractPartyId" placeholder="" style="direction: ltr">
|
||||
|
||||
<div class="col-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">نام</span>
|
||||
<input type="text" class="form-control text-center" id="firstName" placeholder="" style="direction: ltr" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">نام خانوادگی</span>
|
||||
<input type="text" class="form-control text-center" id="lastName" placeholder="" style="direction: ltr" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">تاریخ تولد</span>
|
||||
<input type="text" class="form-control text-center" id="birthdayDate" placeholder="" style="direction: ltr" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">نام پدر</span>
|
||||
<input type="text" class="form-control text-center" id="fatherName" placeholder="" style="direction: ltr" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">شماره شناسنامه</span>
|
||||
<input type="text" class="form-control text-center" id="nationalNumber" placeholder="" style="direction: ltr" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">استان</span>
|
||||
@* <input type="text" class="form-control validControl text-center" id="state" placeholder="انتخاب استان" style="direction: ltr"> *@
|
||||
@* <label>انتخاب استان</label> *@
|
||||
<div class="validControl stateValidate">
|
||||
<select class="form-control select2Option" id="state" onChange="iranwebsv(this.value);">
|
||||
<option value="">نام استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-6">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">شهر</span>
|
||||
@* <label>نام شهر </label> *@
|
||||
@* <input type="text" class="form-control validControl text-center" id="city" placeholder="انتخاب شهر" style="direction: ltr"> *@
|
||||
<div class="validControl cityValidate">
|
||||
<select class="form-control validControl select2Option" name="city" id="city">
|
||||
<option value="0">شهرستان</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<span class="labelRegisterForm">نشانی</span>
|
||||
<textarea class="form-control validControl" id="address" rows="4" style="resize: none"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var updateAddressUrl = `@Url.Page("./Index", "UpdateAddress")`;
|
||||
</script>
|
||||
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
<script src="~/assetsclient/pages/Register/js/_Partials/_Step2.js?ver=@clientVersion"></script>
|
||||
34
ServiceHost/Pages/Register/_Partials/_Step3.cshtml
Normal file
34
ServiceHost/Pages/Register/_Partials/_Step3.cshtml
Normal file
@@ -0,0 +1,34 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
}
|
||||
|
||||
<link href="~/assetsclient/pages/register/css/_partials/_step3.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<div class="row p-0">
|
||||
<main class="main p-0">
|
||||
<div class="container-fluid p-0">
|
||||
<div class="accordion" id="accordionHtml">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btnAdd disable">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white" />
|
||||
<path d="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<div class="mx-1">کارگاه جدید</div>
|
||||
</button>
|
||||
</main>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-start w-100 my-2 px-1">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var institutionPlanForWorkshopUrl = `@Url.Page("./Index", "InstitutionPlanForWorkshop")`;
|
||||
var createOrUpdateWorkshopTempUrl = `@Url.Page("./Index", "CreateOrUpdateWorkshopTemp")`;
|
||||
var getWorkshopTempUrl = `@Url.Page("./Index", "WorkshopTemp")`;
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/Register/js/_Partials/_Step3.js?ver=@clientVersion"></script>
|
||||
141
ServiceHost/Pages/Register/_Partials/_Step4.cshtml
Normal file
141
ServiceHost/Pages/Register/_Partials/_Step4.cshtml
Normal file
@@ -0,0 +1,141 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
}
|
||||
|
||||
<link href="~/assetsclient/pages/register/css/_partials/_step4.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<div class="row p-0 step4Container">
|
||||
<div class="cardHeight p-0">
|
||||
<div class="cardContainer p-3" id="cardSelected">
|
||||
</div>
|
||||
|
||||
<div class="cardBox">
|
||||
<div class="d-block d-lg-flex align-items-center justify-content-between">
|
||||
<div class="d-block d-lg-flex align-items-center justify-content-start gap-1">
|
||||
<div class="titleStep4Contract">شروع قرارداد:</div>
|
||||
|
||||
<div class="radioBtnStartEndContainer">
|
||||
<input type="radio" id="contractStartCurrentMonthFa" value="contractStartCurrentMonthFa" name="radFinanceContract" class="radioOption"/>
|
||||
<label for="contractStartCurrentMonthFa" class="radioLabelStartEndOption">ابتدای ماه جاری</label>
|
||||
|
||||
<input type="radio" id="contractStartNextMonthFa" value="contractStartNextMonthFa" name="radFinanceContract" class="radioOption"/>
|
||||
<label for="contractStartNextMonthFa" class="radioLabelStartEndOption">ابتدای ماه بعد</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-3 start-end-contract-section">
|
||||
<div class="d-flex align-items-center position-relative contractSection">
|
||||
<div class="startEndCon">شروع قرارداد </div>
|
||||
<span class="startEndConSpan ss03" id="ContractStartMonthView"></span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center position-relative contractSection">
|
||||
<div class="startEndCon">پایان قرارداد </div>
|
||||
<span class="startEndConSpan ss03" id="contractEndFa"></span>
|
||||
</div>
|
||||
<input type="hidden" id="ContractStartMonthGr" value=""/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="w-100 p-0" id="footerTap">
|
||||
<div style="display: flex; margin: auto 20px 0 0;" class="disable" id="btnDisableDisable">
|
||||
<button type="button" class="btnStep4Tab active" id="priceStatic">
|
||||
پرداخت یکجا
|
||||
</button>
|
||||
<button type="button" class="btnStep4Tab" id="priceStep">
|
||||
پرداخت ماهانه
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="footerStep4Container">
|
||||
<div class="disable" id="footerDisableDisable">
|
||||
<div class="titleFooter mb-1">مدت قرارداد</div>
|
||||
<div class="d-block text-center d-md-flex align-items-center gap-3 justify-content-center">
|
||||
<div class="radioBtnFooterContainer">
|
||||
<input type="radio" id="oneMonth" value="oneMonth" name="radMonth" class="radioOption" disabled="disabled"/>
|
||||
<label for="oneMonth" class="radioLabelListOption disable">1 ماهه</label>
|
||||
|
||||
<input type="radio" id="threeMonth" value="threeMonth" name="radMonth" class="radioOption" disabled="disabled" />
|
||||
<label for="threeMonth" class="radioLabelListOption disable">3 ماهه</label>
|
||||
|
||||
<input type="radio" id="sixMonth" value="sixMonth" name="radMonth" class="radioOption" disabled="disabled" />
|
||||
<label for="sixMonth" class="radioLabelListOption disable">6 ماهه</label>
|
||||
|
||||
<input type="radio" id="twelveMonth" value="twelveMonth" name="radMonth" class="radioOption" checked="checked"/>
|
||||
<label for="twelveMonth" class="radioLabelListOption">12 ماهه</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="infoPricesContainerDiv mt-1" id="priceStepContainer" style="visibility: hidden;">
|
||||
<div class="infoPricesContainer" id="priceStepContainerHtml">
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : اول</div>
|
||||
<div class="col-4 textRightCenter">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : دوم</div>
|
||||
<div class="col-4 textRightCenter">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : سوم</div>
|
||||
<div class="col-4 textRightCenter">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : چهارم</div>
|
||||
<div class="col-4 textRightCenter">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : پنجم</div>
|
||||
<div class="col-4 textRightCenter">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : ششم</div>
|
||||
<div class="col-4 textRightCenter">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="">
|
||||
<div class="lineRegisterStep4 px-2 my-2"></div>
|
||||
<div class="d-block text-center d-md-flex justify-content-end align-items-center gap-5">
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4 gap-5">
|
||||
<div class="titlePriceStep4">مجموع مبالغ:</div>
|
||||
<div class="totalPriceStep4" style="color: #6b6b6b" id="sumOfWorkshopsPaymentPayment">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4 gap-5">
|
||||
<div class="titlePriceStep4">ارزش افزوده:</div>
|
||||
<div class="totalPriceStep4" style="color: #6b6b6b" id="valueAddedTaxSt">-</div>
|
||||
<input type="hidden" id="valueAddedTaxDoubleInput"/>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between mt-1 px-1 px-lg-4 gap-5">
|
||||
<div class="titlePriceStep4">مبلغ قابل پرداخت:</div>
|
||||
<div class="totalPriceStep4" id="totalPaymentStr">-</div>
|
||||
<input type="hidden" id="totalPaymentDoubleInput"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var receivedCodeFromServerUrl = `@Url.Page("./Index", "ReceivedCodeFromServer")`;
|
||||
var totalPaymentAndWorkshopListUrl = `@Url.Page("./Index", "TotalPaymentAndWorkshopList")`;
|
||||
var createOrUpdateInstitutionContractTemp = `@Url.Page("./Index", "CreateOrUpdateInstitutionContractTemp")`;
|
||||
var CreateOrUpdatePeriodTemp = `@Url.Page("./Index", "CreateOrUpdatePeriodTemp")`;
|
||||
</script>
|
||||
|
||||
<script src="~/assetsclient/pages/Register/js/_Partials/_Step4.js?ver=@clientVersion"></script>
|
||||
158
ServiceHost/Pages/Register/_Partials/_Step5.cshtml
Normal file
158
ServiceHost/Pages/Register/_Partials/_Step5.cshtml
Normal file
@@ -0,0 +1,158 @@
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
}
|
||||
|
||||
<link href="~/assetsclient/pages/register/css/_partials/_step5.css?ver=@clientVersion" rel="stylesheet" />
|
||||
|
||||
<div class="row p-0">
|
||||
<div class="descriptionStep5">
|
||||
<div class="descriptionContainerStep5">
|
||||
<div class="titleDescStep5 mb-3">قوانین و مقررات استفاده از سامانه گزارشگیر</div>
|
||||
<p class="textDescStep5">
|
||||
توجه: ورود، ثبتنام و استفاده از خدمات سامانه گزارشگیر به منزله پذیرش کامل این توافقنامه و تعهد به رعایت مفاد آن توسط کاربر میباشد. لطفاً پیش از استفاده، با دقت مطالعه فرمایید.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۱. مالکیت معنوی و حقوق نرمافزار</div>
|
||||
<p class="textDescStep5">
|
||||
کلیه حقوق مادی و معنوی سامانه، شامل کدهای برنامهنویسی، طراحی گرافیکی، نام تجاری، محتوا، دادههای ساختاریافته و سایر اجزای نرمافزار، متعلق به شرکت/مالک سامانه گزارشگیر است. هرگونه کپیبرداری، استخراج داده، فروش یا ارائه خدمات مشابه بدون کسب مجوز کتبی، موجب پیگرد قانونی خواهد بود.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۲. شرایط استفاده از حساب کاربری</div>
|
||||
<p class="textDescStep5">
|
||||
هر کاربر موظف است اطلاعات صحیح، کامل و مستند وارد نماید. مسئولیت حفظ نام کاربری و رمز عبور بر عهده کاربر است و در صورت سوءاستفاده توسط اشخاص دیگر، سامانه هیچگونه مسئولیتی نخواهد داشت. کاربران موظف به استفادهی مشروع از سامانه در چارچوب قوانین جمهوری اسلامی ایران میباشند.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۳. حفظ حریم خصوصی</div>
|
||||
<p class="textDescStep5">
|
||||
کلیه اطلاعات واردشده توسط کاربران، محرمانه تلقی شده و فقط در راستای ارائه خدمات و توسعه سامانه استفاده خواهد شد. سامانه متعهد به عدم فروش یا افشای اطلاعات کاربران به اشخاص ثالث است، مگر با حکم قضایی یا درخواست مراجع ذیصلاح قانونی. دسترسی به اطلاعات کاربران توسط کارشناسان فقط با هدف پشتیبانی و رفع مشکل انجام میپذیرد و تحت نظارت داخلی قرار دارد.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۴. شرایط پرداخت، لغو خرید و بازگشت وجه</div>
|
||||
<p class="textDescStep5 m-0">
|
||||
پرداخت هزینههای اشتراک، امکانات ویژه یا نسخههای حرفهای سامانه از طریق درگاههای امن بانکی انجام میپذیرد.
|
||||
</p>
|
||||
<p class="textDescStep5">
|
||||
پس از واریز وجه و فعالسازی خدمات یا پنلهای مرتبط، به دلیل ماهیت دیجیتالی و غیرقابل استرداد بودن خدمات، امکان بازگشت وجه تحت هیچ شرایطی وجود ندارد. کاربران با پرداخت هزینه، صراحتاً اعلام میدارند که از خدمات و شرایط استفاده آگاه بوده و حق هرگونه ادعا یا مطالبه در خصوص بازپرداخت وجه را از خود سلب میکنند. در صورت پرداخت اشتباه یا دو بار پرداخت، صرفاً پس از بررسی فنی و ثبت درخواست، امکان استرداد وجه با کسر کارمزد بانکی وجود دارد.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۵. پشتیبانی و رسیدگی به درخواستها</div>
|
||||
<p class="textDescStep5">
|
||||
سامانه دارای سیستم پشتیبانی داخلی است و کاربران میتوانند در هر بخش از نرمافزار، مشکل یا سوال خود را از طریق پنل پشتیبانی ثبت نمایند. کارشناسان موظف به پاسخگویی در ساعات اداری و طی مدت زمان معقول هستند. کاربران متعهد هستند هنگام ثبت درخواست، از الفاظ محترمانه و متعارف استفاده نمایند. در غیر اینصورت، پشتیبانی محدود خواهد شد.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۶. مسئولیت صحت دادهها</div>
|
||||
<p class="textDescStep5">
|
||||
کلیه اطلاعات اعم از حضور و غیاب، فیشهای حقوقی، اطلاعات پرسنل و گزارشات، بر اساس دادههای واردشده توسط کاربران و کارفرمایان تولید میشود. مسئولیت صحت، دقت و درستی اطلاعات بر عهده کاربر واردکننده اطلاعات است. سامانه هیچگونه مسئولیتی در قبال خسارات ناشی از اطلاعات نادرست نخواهد داشت.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۷. محدودیتهای استفاده</div>
|
||||
<p class="textDescStep5">
|
||||
کاربران مجاز به دستکاری، نفوذ، مهندسی معکوس، بارگذاری بدافزار یا انجام هرگونه اقدام مخرب علیه سامانه نمیباشند. در صورت بروز تخلف، دسترسی کاربر به سامانه بدون اخطار قبلی محدود یا مسدود خواهد شد و مراتب از طریق مراجع قانونی پیگیری میگردد.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۸. قطع خدمات و مسائل فنی</div>
|
||||
<p class="textDescStep5">
|
||||
سامانه گزارشگیر تلاش میکند خدمات را بهصورت مداوم و بدون وقفه ارائه دهد. با این حال، در صورت بروز اختلال فنی، قطعی اینترنت، بروزرسانیها یا عوامل خارج از کنترل، مسئولیتی در قبال بروز وقفه یا آسیبهای احتمالی متوجه سامانه نخواهد بود.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۹. حل اختلاف و صلاحیت قضایی</div>
|
||||
<p class="textDescStep5">
|
||||
در صورت بروز هرگونه اختلاف میان کاربران و مدیریت سامانه: ابتدا تلاش خواهد شد موضوع از طریق گفتگو و مصالحه حلوفصل شود. در صورت عدم توافق، مرجع رسمی رسیدگی، مراجع صالح قضایی جمهوری اسلامی ایران خواهد بود و کاربران با پذیرش این متن، صلاحیت این مراجع را میپذیرند.
|
||||
</p>
|
||||
|
||||
<div class="textH4DescStep5">۱۰. بهروزرسانی مقررات</div>
|
||||
<p class="textDescStep5">
|
||||
این قوانین ممکن است در بازههای زمانی مختلف بهروزرسانی شود. مسئولیت پیگیری تغییرات بر عهده کاربران بوده و نسخهی جدید از طریق سایت و پنل کاربری اعلام خواهد شد.
|
||||
</p>
|
||||
|
||||
<p class="textDescStep5 m-0">
|
||||
توجه مهم:
|
||||
</p>
|
||||
<p class="textDescStep5">
|
||||
با ثبتنام، ورود و پرداخت هرگونه وجه در سامانه گزارشگیر، شما بهصورت کامل و بدون شرط با کلیه مفاد این توافقنامه موافقت کردهاید و امکان طرح دعوی در خصوص بازگشت وجه، عدم رضایت از خدمات یا ادعای خسارت وجود نخواهد داشت.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="lineRegisterStep5 px-2"></div>
|
||||
<div class="w-100 my-3">
|
||||
@* <div class="d-flex align-items-center justify-content-between my-4 px-1 px-lg-4">
|
||||
<div class="titlePriceStep5">مبلغ قابل پرداخت:</div>
|
||||
<div class="totalPriceStep5">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||
</div> *@
|
||||
|
||||
<div class="d-block text-center d-md-flex justify-content-end align-items-center gap-5">
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4">
|
||||
<div class="titlePriceStep5">مجموع مبالغ:</div>
|
||||
<div class="totalPriceStep5" style="color: #6b6b6b" id="sumOfWorkshopsPaymentPaymentStep5">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4">
|
||||
<div class="titlePriceStep5">ارزش افزوده:</div>
|
||||
<div class="totalPriceStep5" style="color: #6b6b6b" id="valueAddedTaxStStep5">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between mt-1 px-1 px-lg-4">
|
||||
<div class="titlePriceStep5">مبلغ قابل پرداخت:</div>
|
||||
<div class="totalPriceStep5" id="totalPaymentStrStep5">-</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="registerBtnStep5" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="registerBtnStep5Label" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header pb-0 d-flex align-items-center justify-content-center text-center">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div>
|
||||
<p class="m-0 pdHeaderTitle1">تاییده حساب کاربری</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="otpRegister disable">
|
||||
<input type="text" id="reg0" class="form-control codeInputRegister" placeholder="-" maxlength="1" autocomplete="off" autofocus data-next="1" disabled>
|
||||
<input type="text" id="reg1" class="form-control codeInputRegister" placeholder="-" maxlength="1" autocomplete="off" data-next="2" disabled>
|
||||
<input type="text" id="reg2" class="form-control codeInputRegister" placeholder="-" maxlength="1" autocomplete="off" data-next="3" disabled>
|
||||
<input type="text" id="reg3" class="form-control codeInputRegister" placeholder="-" maxlength="1" autocomplete="off" data-next="4" disabled>
|
||||
<input type="text" id="reg4" class="form-control codeInputRegister" placeholder="-" maxlength="1" autocomplete="off" data-next="5" disabled>
|
||||
<input type="text" id="reg5" class="form-control codeInputRegister" placeholder="-" maxlength="1" autocomplete="off" data-next="end" disabled>
|
||||
</div>
|
||||
<div id="timerContainer" style="display: none; text-align: center; margin-top: 10px;">
|
||||
<div id="timerText" style="font-weight: bold; color: red;">02:00</div>
|
||||
<div style="font-size: 12px;color: #6f6f6f;" id="messagePhoneNumber"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="d-flex justify-content-center w-100 gap-3">
|
||||
<button type="button" class="btn-cancel w-50" data-bs-dismiss="modal" style="padding:6px 9px; font-size: inherit;">
|
||||
انصراف
|
||||
</button>
|
||||
<button type="button" class="stepBtn stepNext w-50 position-relative" id="getCodeRegisterToPay">
|
||||
<span>دریافت کد</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
<button type="button" class="stepBtn stepNext w-50 position-relative" id="getCodeRegisterToPayFinal" style="display: none">
|
||||
<span>ارسال کد</span>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var receivedCodeFromServerUrl = `@Url.Page("./Index", "ReceivedCodeFromServer")`;
|
||||
var checkVerifyCodeIsTrueUrl = `@Url.Page("./Index", "CheckVerifyCodeIsTrue")`;
|
||||
</script>
|
||||
|
||||
<script src="~/assetsclient/pages/Register/js/_Partials/_Step5.js?ver=@clientVersion"></script>
|
||||
71
ServiceHost/Pages/Shared/_Footer.cshtml
Normal file
71
ServiceHost/Pages/Shared/_Footer.cshtml
Normal file
@@ -0,0 +1,71 @@
|
||||
|
||||
|
||||
<div class="bg-[#D1DBE8] p-9 dark:bg-[#212330]">
|
||||
<div class="flex justify-between items-center border-b border-b-[#AEAEAE] pb-3 dark:border-b-[#494B57]">
|
||||
<div class="hidden items-center gap-3 md:flex">
|
||||
<svg class="cursor-pointer text-[#465A71] dark:text-[#D1D1D1]" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.3195 12C15.3195 12.5696 15.1505 13.1264 14.8341 13.6C14.5176 14.0737 14.0678 14.4428 13.5416 14.6608C13.0153 14.8788 12.4363 14.9358 11.8776 14.8247C11.3189 14.7135 10.8058 14.4392 10.403 14.0365C10.0002 13.6337 9.72592 13.1205 9.61479 12.5619C9.50367 12.0032 9.5607 11.4241 9.77868 10.8979C9.99666 10.3716 10.3658 9.92183 10.8394 9.60537C11.313 9.28891 11.8698 9.12 12.4395 9.12C13.203 9.12087 13.935 9.42458 14.475 9.9645C15.0149 10.5044 15.3186 11.2364 15.3195 12ZM21.4395 8.04V15.96C21.4379 17.2962 20.9065 18.5773 19.9616 19.5221C19.0167 20.467 17.7357 20.9985 16.3995 21H8.47945C7.14323 20.9985 5.86216 20.467 4.91731 19.5221C3.97245 18.5773 3.44097 17.2962 3.43945 15.96V8.04C3.44097 6.70377 3.97245 5.42271 4.91731 4.47785C5.86216 3.533 7.14323 3.00151 8.47945 3H16.3995C17.7357 3.00151 19.0167 3.533 19.9616 4.47785C20.9065 5.42271 21.4379 6.70377 21.4395 8.04ZM16.7595 12C16.7595 11.1456 16.5061 10.3104 16.0314 9.59994C15.5567 8.88952 14.882 8.33581 14.0926 8.00884C13.3033 7.68187 12.4347 7.59632 11.5967 7.76301C10.7587 7.9297 9.98891 8.34114 9.38475 8.9453C8.78059 9.54946 8.36915 10.3192 8.20246 11.1572C8.03577 11.9952 8.12132 12.8638 8.44829 13.6532C8.77526 14.4426 9.32897 15.1173 10.0394 15.5919C10.7498 16.0666 11.585 16.32 12.4395 16.32C13.5848 16.3187 14.6828 15.8631 15.4927 15.0533C16.3026 14.2434 16.7582 13.1453 16.7595 12ZM18.1995 7.32C18.1995 7.1064 18.1361 6.89759 18.0174 6.71998C17.8988 6.54238 17.7301 6.40395 17.5328 6.32221C17.3354 6.24047 17.1183 6.21908 16.9088 6.26075C16.6993 6.30242 16.5068 6.40528 16.3558 6.55632C16.2047 6.70737 16.1019 6.8998 16.0602 7.1093C16.0185 7.3188 16.0399 7.53595 16.1217 7.7333C16.2034 7.93064 16.3418 8.09932 16.5194 8.21799C16.697 8.33666 16.9058 8.4 17.1195 8.4C17.4059 8.4 17.6806 8.28621 17.8831 8.08368C18.0857 7.88114 18.1995 7.60643 18.1995 7.32Z" fill="currentColor" />
|
||||
</svg>
|
||||
<svg class="cursor-pointer text-[#465A71] dark:text-[#D1D1D1]" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_4615_42247" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="2" y="3" width="20" height="18">
|
||||
<path d="M22 3H2V21H22V3Z" fill="#B2C2D6" />
|
||||
</mask>
|
||||
<g mask="url(#mask0_4615_42247)">
|
||||
<path d="M2.33317 11.6799L6.70136 13.2523L8.4042 18.5413C8.47824 18.8986 8.92246 18.9701 9.21861 18.7557L11.6618 16.8259C11.8839 16.6115 12.2541 16.6115 12.5503 16.8259L16.9184 19.8993C17.2146 20.1137 17.6588 19.9707 17.7329 19.6134L20.9905 4.60405C21.0645 4.24669 20.6943 3.88933 20.3241 4.03227L2.33317 10.7507C1.88894 10.8937 1.88894 11.5369 2.33317 11.6799ZM8.1821 12.4661L16.7704 7.3915C16.9184 7.32002 17.0665 7.53445 16.9184 7.60592L9.88494 13.967C9.66283 14.1814 9.44071 14.4673 9.44071 14.8247L9.21861 16.54C9.21861 16.7545 8.84842 16.8259 8.77438 16.54L7.88593 13.3952C7.66382 13.0379 7.81191 12.609 8.1821 12.4661Z" fill="currentColor" />
|
||||
</g>
|
||||
</svg>
|
||||
<svg class="cursor-pointer text-[#465A71] dark:text-[#D1D1D1]" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.42528 2.5C2.95881 2.5 2 3.45698 2 4.7148C2 5.94484 2.93025 6.92912 4.36901 6.92912H4.39684C5.892 6.92912 6.82249 5.94484 6.82249 4.7148C6.79454 3.45698 5.892 2.5 4.42528 2.5Z" fill="currentColor" />
|
||||
<path d="M2.25391 8.67969H6.54102V21.4976H2.25391V8.67969Z" fill="currentColor" />
|
||||
<path d="M17.0649 8.38281C14.7521 8.38281 13.2013 10.5425 13.2013 10.5425V8.68365H8.91406V21.5016H13.2011V14.3435C13.2011 13.9603 13.229 13.5777 13.3423 13.3037C13.6522 12.5385 14.3575 11.7458 15.5419 11.7458C17.0932 11.7458 17.7136 12.9212 17.7136 14.6444V21.5016H22.0004V14.152C22.0004 10.2149 19.8853 8.38281 17.0649 8.38281Z" fill="currentColor" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="block items-center text-[#515151] gap-3 dark:text-white lg:flex">
|
||||
@* <div class="font-medium duration-300 ease-in-out cursor-pointer hover:text-[#424242] dark:hover:text-[#D0D0D0]">شرایط استفاده از خدمات</div> *@
|
||||
<div class="font-medium duration-300 ease-in-out cursor-pointer hover:text-[#424242] dark:hover:text-[#D0D0D0]"><a asp-page="/rule/Index">قوانین و مقررات</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="flex flex-col justify-between items-center pt-6 md:flex-row">
|
||||
<div class="hidden items-center gap-3 md:flex">
|
||||
<img src="~/assetsmain/images/logo.svg" class="w-16" alt="" srcset="">
|
||||
<div class="text-[#178C8C]">
|
||||
<div class="text-[1.3rem] font-[900]">گزارشگیر</div>
|
||||
<div class="text-[0.9rem] font-[600]">سامانه هوشمند منابع انسانی</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="font-medium text-[#3C3C3C] text-center order-2 dark:text-white md:order-1">کلیه حقوق مادی و معنوی این وب سایت برای شرکت داده پردازان گزارشگیر منطقه آزاد انزلی محفوظ می باشد.</div>
|
||||
|
||||
<div class="flex items-center justify-between w-full order-1 md:w-auto md:order-2">
|
||||
<div class="flex items-center gap-3 md:hidden">
|
||||
<svg class="cursor-pointer text-[#465A71] dark:text-[#D1D1D1]" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.3195 12C15.3195 12.5696 15.1505 13.1264 14.8341 13.6C14.5176 14.0737 14.0678 14.4428 13.5416 14.6608C13.0153 14.8788 12.4363 14.9358 11.8776 14.8247C11.3189 14.7135 10.8058 14.4392 10.403 14.0365C10.0002 13.6337 9.72592 13.1205 9.61479 12.5619C9.50367 12.0032 9.5607 11.4241 9.77868 10.8979C9.99666 10.3716 10.3658 9.92183 10.8394 9.60537C11.313 9.28891 11.8698 9.12 12.4395 9.12C13.203 9.12087 13.935 9.42458 14.475 9.9645C15.0149 10.5044 15.3186 11.2364 15.3195 12ZM21.4395 8.04V15.96C21.4379 17.2962 20.9065 18.5773 19.9616 19.5221C19.0167 20.467 17.7357 20.9985 16.3995 21H8.47945C7.14323 20.9985 5.86216 20.467 4.91731 19.5221C3.97245 18.5773 3.44097 17.2962 3.43945 15.96V8.04C3.44097 6.70377 3.97245 5.42271 4.91731 4.47785C5.86216 3.533 7.14323 3.00151 8.47945 3H16.3995C17.7357 3.00151 19.0167 3.533 19.9616 4.47785C20.9065 5.42271 21.4379 6.70377 21.4395 8.04ZM16.7595 12C16.7595 11.1456 16.5061 10.3104 16.0314 9.59994C15.5567 8.88952 14.882 8.33581 14.0926 8.00884C13.3033 7.68187 12.4347 7.59632 11.5967 7.76301C10.7587 7.9297 9.98891 8.34114 9.38475 8.9453C8.78059 9.54946 8.36915 10.3192 8.20246 11.1572C8.03577 11.9952 8.12132 12.8638 8.44829 13.6532C8.77526 14.4426 9.32897 15.1173 10.0394 15.5919C10.7498 16.0666 11.585 16.32 12.4395 16.32C13.5848 16.3187 14.6828 15.8631 15.4927 15.0533C16.3026 14.2434 16.7582 13.1453 16.7595 12ZM18.1995 7.32C18.1995 7.1064 18.1361 6.89759 18.0174 6.71998C17.8988 6.54238 17.7301 6.40395 17.5328 6.32221C17.3354 6.24047 17.1183 6.21908 16.9088 6.26075C16.6993 6.30242 16.5068 6.40528 16.3558 6.55632C16.2047 6.70737 16.1019 6.8998 16.0602 7.1093C16.0185 7.3188 16.0399 7.53595 16.1217 7.7333C16.2034 7.93064 16.3418 8.09932 16.5194 8.21799C16.697 8.33666 16.9058 8.4 17.1195 8.4C17.4059 8.4 17.6806 8.28621 17.8831 8.08368C18.0857 7.88114 18.1995 7.60643 18.1995 7.32Z" fill="currentColor" />
|
||||
</svg>
|
||||
<svg class="cursor-pointer text-[#465A71] dark:text-[#D1D1D1]" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_4615_42247" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="2" y="3" width="20" height="18">
|
||||
<path d="M22 3H2V21H22V3Z" fill="#B2C2D6" />
|
||||
</mask>
|
||||
<g mask="url(#mask0_4615_42247)">
|
||||
<path d="M2.33317 11.6799L6.70136 13.2523L8.4042 18.5413C8.47824 18.8986 8.92246 18.9701 9.21861 18.7557L11.6618 16.8259C11.8839 16.6115 12.2541 16.6115 12.5503 16.8259L16.9184 19.8993C17.2146 20.1137 17.6588 19.9707 17.7329 19.6134L20.9905 4.60405C21.0645 4.24669 20.6943 3.88933 20.3241 4.03227L2.33317 10.7507C1.88894 10.8937 1.88894 11.5369 2.33317 11.6799ZM8.1821 12.4661L16.7704 7.3915C16.9184 7.32002 17.0665 7.53445 16.9184 7.60592L9.88494 13.967C9.66283 14.1814 9.44071 14.4673 9.44071 14.8247L9.21861 16.54C9.21861 16.7545 8.84842 16.8259 8.77438 16.54L7.88593 13.3952C7.66382 13.0379 7.81191 12.609 8.1821 12.4661Z" fill="currentColor" />
|
||||
</g>
|
||||
</svg>
|
||||
<svg class="cursor-pointer text-[#465A71] dark:text-[#D1D1D1]" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.42528 2.5C2.95881 2.5 2 3.45698 2 4.7148C2 5.94484 2.93025 6.92912 4.36901 6.92912H4.39684C5.892 6.92912 6.82249 5.94484 6.82249 4.7148C6.79454 3.45698 5.892 2.5 4.42528 2.5Z" fill="currentColor" />
|
||||
<path d="M2.25391 8.67969H6.54102V21.4976H2.25391V8.67969Z" fill="currentColor" />
|
||||
<path d="M17.0649 8.38281C14.7521 8.38281 13.2013 10.5425 13.2013 10.5425V8.68365H8.91406V21.5016H13.2011V14.3435C13.2011 13.9603 13.229 13.5777 13.3423 13.3037C13.6522 12.5385 14.3575 11.7458 15.5419 11.7458C17.0932 11.7458 17.7136 12.9212 17.7136 14.6444V21.5016H22.0004V14.152C22.0004 10.2149 19.8853 8.38281 17.0649 8.38281Z" fill="currentColor" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<img src="~/assetsmain/images/enamad_icon.png" class="w-24" alt="" srcset="" style="visibility: hidden">
|
||||
<img src="~/assetsmain/images/enamed-park.png" class="w-24" alt="" srcset="" style="visibility: hidden">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
385
ServiceHost/Pages/Shared/_Header.cshtml
Normal file
385
ServiceHost/Pages/Shared/_Header.cshtml
Normal file
@@ -0,0 +1,385 @@
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
|
||||
@{
|
||||
var currentAccount = AuthHelper.CurrentAccountInfo();
|
||||
var redirectDashboard = "";
|
||||
if (User.Identity is { IsAuthenticated: true })
|
||||
{
|
||||
if (User.FindFirstValue("IsCamera") == "true")
|
||||
{
|
||||
redirectDashboard = "/Camera";
|
||||
}
|
||||
else if ((User.FindFirstValue("ClientAriaPermission") == "true") && (User.FindFirstValue("AdminAreaPermission") == "false"))
|
||||
{
|
||||
redirectDashboard = "/Client";
|
||||
}
|
||||
else
|
||||
{
|
||||
redirectDashboard = "/Admin";
|
||||
}
|
||||
}
|
||||
|
||||
<style>
|
||||
.liActive {
|
||||
background-color: #F1F1F1;
|
||||
width: 100%;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.dark\:liActive:is(.dark *) {
|
||||
background-color: #212330;
|
||||
width: 100%;
|
||||
border-radius: 9px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.liActive svg {
|
||||
stroke: #575757;
|
||||
}
|
||||
|
||||
.dark\:liActive:is(.dark *) svg {
|
||||
stroke: #ffffff;
|
||||
}
|
||||
|
||||
.authBg {
|
||||
background-color: #F1F1F1;
|
||||
width: 100%;
|
||||
border-radius: 9px;
|
||||
padding: 7px;
|
||||
}
|
||||
.dark\:authBg:is(.dark *) {
|
||||
background-color: #212330;
|
||||
width: 100%;
|
||||
border-radius: 9px;
|
||||
padding: 7px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.mobileAuth:first-child {
|
||||
color: #575757; font-size: 13px;
|
||||
}
|
||||
|
||||
.mobileAuth:last-child {
|
||||
color: #878787; font-size: 11px;
|
||||
}
|
||||
|
||||
|
||||
.dark\:mobileAuth:is(.dark *) {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
.dark\:authBg:is(.dark *) svg {
|
||||
stroke: #ffffff;
|
||||
}
|
||||
|
||||
.authBg .avatar{
|
||||
background-color: #E8E8E8;
|
||||
// width: 100%;
|
||||
border-radius: 7px;
|
||||
padding: 2px
|
||||
}
|
||||
|
||||
.authBgLog {
|
||||
background-color: #F1F1F1;
|
||||
width: 100%;
|
||||
border-radius: 9px;
|
||||
padding: 7px 9px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dark\:authBgLog:is(.dark *) {
|
||||
background-color: #212330;
|
||||
width: 100%;
|
||||
border-radius: 9px;
|
||||
padding: 7px 9px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.lineAuthSeparate {
|
||||
background: #ffffff; background: linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(171, 171, 171, 1) 50%, rgba(255, 255, 255, 1) 100%); width: 100%; height: 1px; margin: 31px auto;
|
||||
}
|
||||
|
||||
.dark\:lineAuthSeparate:is(.dark *) {
|
||||
background: #171923;
|
||||
background: linear-gradient(90deg,rgba(23, 25, 35, 1) 0%, rgba(255, 255, 255, 1) 50%, rgba(23, 25, 35, 1) 100%);
|
||||
width: 100%; height: 1px; margin: 31px auto;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="bg-white py-3 px-1 border-b-2 border-b-gray-200 z-[100] sticky top-0 dark:bg-[#212330] dark:border-b-[#212330] md:px-3 lg:px-6">
|
||||
<div class="flex items-center justify-between space-x-3">
|
||||
<div class="hidden items-center gap-2 lg:flex">
|
||||
<div class="text-[#138A8A] text-[0.75rem] font-[800] lg:text-[0.86rem]">گزارشگیر</div>
|
||||
<div class="text-[#138A8A] text-[0.71rem] font-[700] lg:text-[0.82rem]">سامانه هوشمند مدیریت منابع انسانی</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 lg:hidden">
|
||||
|
||||
<button onclick="toggleMenu()" class="text-[#33363F] dark:text-white" class="mx-1">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 7H19" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M5 12H19" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M5 17H19" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
<img src="~/AssetsMain/images/logo.svg" class="w-9" alt="" srcset="">
|
||||
<div class="text-[#178C8C]">
|
||||
<div class="text-[0.9rem] font-[900]">گزارشگیر</div>
|
||||
<div class="text-[0.8rem] font-[700]">سامانه هوشمند منابع انسانی</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="flex items-center gap-2 text-[#575757] dark:text-white lg:gap-5">
|
||||
<div class="hidden gap-3 items-center lg:flex">
|
||||
@* <div class="text-[0.75rem] font-[500] lg:text-[0.86rem]">پایگاه دانش</div> *@
|
||||
<div class="text-[0.75rem] font-[500] lg:text-[0.86rem]"><a asp-page="/about-us/Index">درباره ما</a></div>
|
||||
<div class="text-[0.75rem] font-[500] lg:text-[0.86rem]"><a asp-page="/contact-us/Index">تماس با ما</a></div>
|
||||
<div class="text-[0.75rem] font-[500] lg:text-[0.86rem]"><a asp-page="/complaints/Index">ثبت شکایات</a></div>
|
||||
<div class="h-7 w-1 border-e-2 border-[#575757]"></div>
|
||||
</div>
|
||||
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<div class="flex gap-1 lg:hidden">
|
||||
<a href="@redirectDashboard">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="User_box_duotone">
|
||||
<path id="Rectangle 1" d="M3 11C3 7.22876 3 5.34315 4.17157 4.17157C5.34315 3 7.22876 3 11 3H13C16.7712 3 18.6569 3 19.8284 4.17157C21 5.34315 21 7.22876 21 11V13C21 16.7712 21 18.6569 19.8284 19.8284C18.6569 21 16.7712 21 13 21H11C7.22876 21 5.34315 21 4.17157 19.8284C3 18.6569 3 16.7712 3 13V11Z" fill="#A9EEEE"/>
|
||||
<circle id="Ellipse 46" cx="12" cy="10" r="4" fill="#138A8A"/>
|
||||
<path id="Intersect" fill-rule="evenodd" clip-rule="evenodd" d="M18.9463 20.2532C18.9616 20.3587 18.9048 20.4613 18.8063 20.5021C17.6048 21 15.8353 21 13 21H11C8.16476 21 6.3953 21 5.19377 20.5022C5.0953 20.4614 5.03846 20.3587 5.05373 20.2532C5.48265 17.2919 8.42909 15 12 15C15.571 15 18.5174 17.2919 18.9463 20.2532Z" fill="#138A8A"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
@* <button>
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.3604 5.91585L17.6802 3.44543C18.3284 3.22665 19 3.70878 19 4.39292V19.6071C19 20.2912 18.3284 20.7733 17.6802 20.5546L10.3604 18.0841C9.54739 17.8097 9 17.0473 9 16.1892V7.81083C9 6.95273 9.5474 6.19025 10.3604 5.91585Z" fill="#A9EEEE" />
|
||||
<path d="M5.75 9L3 12M3 12L5.75 15M3 12H11" stroke="#138A8A" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button> *@
|
||||
</div>
|
||||
}
|
||||
|
||||
<button id="btn-darkmode" class="cursor-pointer text-[#585960] dark:text-[#D1D1D1]">
|
||||
<svg class="inline dark:hidden" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.6247 5.00988C11.7489 5.00332 11.874 5 11.9998 5C15.8658 5 18.9998 8.13401 18.9998 12C18.9998 15.866 15.8658 19 11.9998 19C10.6729 19 9.43231 18.6308 8.375 17.9896C12.0666 17.7946 14.9998 14.7396 14.9998 10.9995C14.9998 8.46034 13.6479 6.23697 11.6247 5.00988Z" fill="currentColor" />
|
||||
<path d="M5.4 10.2L5.4 10.2C5.50137 10.5041 5.55206 10.6562 5.60276 10.7225C5.80288 10.9843 6.19712 10.9843 6.39724 10.7225C6.44794 10.6562 6.49863 10.5041 6.6 10.2L6.6 10.2C6.68177 9.95468 6.72266 9.83201 6.77555 9.72099C6.97291 9.30672 7.30672 8.97291 7.72099 8.77555C7.83201 8.72266 7.95468 8.68177 8.2 8.6L8.2 8.6C8.50412 8.49863 8.65618 8.44794 8.7225 8.39724C8.98431 8.19712 8.98431 7.80288 8.7225 7.60276C8.65618 7.55206 8.50412 7.50137 8.2 7.4L8.2 7.4C7.95468 7.31822 7.83201 7.27734 7.72099 7.22445C7.30672 7.02709 6.97291 6.69329 6.77555 6.27901C6.72266 6.16799 6.68177 6.04532 6.6 5.8C6.49863 5.49588 6.44794 5.34382 6.39724 5.2775C6.19712 5.01569 5.80288 5.01569 5.60276 5.2775C5.55206 5.34382 5.50137 5.49588 5.4 5.8C5.31823 6.04532 5.27734 6.16799 5.22445 6.27901C5.02709 6.69329 4.69329 7.02709 4.27901 7.22445C4.16799 7.27734 4.04532 7.31823 3.8 7.4C3.49588 7.50137 3.34382 7.55206 3.2775 7.60276C3.01569 7.80288 3.01569 8.19712 3.2775 8.39724C3.34382 8.44794 3.49588 8.49863 3.8 8.6C4.04532 8.68177 4.16799 8.72266 4.27901 8.77555C4.69329 8.97291 5.02709 9.30672 5.22445 9.72099C5.27734 9.83201 5.31822 9.95468 5.4 10.2Z" fill="currentColor" />
|
||||
</svg>
|
||||
|
||||
<svg class="hidden dark:inline" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="4" fill="white" />
|
||||
<path d="M12 5V3" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M12 21V19" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M16.9498 7.05093L18.364 5.63672" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M5.63608 18.3634L7.05029 16.9492" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M19 12L21 12" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M3 12L5 12" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M16.9498 16.9491L18.364 18.3633" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M5.63608 5.63657L7.05029 7.05078" stroke="white" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hidden items-center justify-between space-x-3 px-3 lg:flex">
|
||||
<div class="flex items-center gap-9">
|
||||
<img src="~/AssetsMain/images/logo.svg" class="w-16" alt="" srcset="">
|
||||
<ul id="main-menu" class="flex items-center gap-9 text-[#575757] dark:text-white">
|
||||
<li class="text-[0.8rem] font-[600] cursor-pointer duration-300 ease-in-out hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]"><a asp-page="/Index">صفحه اصلی</a></li>
|
||||
<li class="text-[0.8rem] font-[600] cursor-pointer duration-300 ease-in-out hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]"><a href="/" data-scroll-to="services">خدمات</a></li>
|
||||
@*<li class="text-[0.8rem] font-[600] cursor-pointer duration-300 ease-in-out hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]">منابع دانش</li> *@
|
||||
<li class="text-[0.8rem] font-[600] cursor-pointer duration-300 ease-in-out hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]"><a asp-page="/contact-us/Index">تماس با ما</a></li>
|
||||
<li class="text-[0.8rem] font-[600] cursor-pointer duration-300 ease-in-out hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]"><a asp-page="/about-us/Index">درباره ما</a></li>
|
||||
<li class="text-[0.8rem] font-[600] cursor-pointer duration-300 ease-in-out hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]"><a asp-page="/rule/Index">قوانین و مقررات</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-3">
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<a href="@redirectDashboard" class="py-[0.54rem] w-[5.1rem] px-1 text-[0.8rem] font-[500] text-center bg-white border-2 border-[#2DBCBC] text-[#138F8F] rounded-md duration-500 ease-in-out hover:bg-[#2DBCBC] hover:text-white">
|
||||
@* <span>@currentAccount.Fullname</span> *@
|
||||
<span>پیشخان</span>
|
||||
</a>
|
||||
<a asp-page="/Index" asp-page-handler="Logout" class="py-[0.54rem] w-[5.1rem] px-1 text-[0.8rem] font-[500] text-center bg-white border-2 border-[#2DBCBC] text-[#138F8F] rounded-md duration-500 ease-in-out hover:bg-[#2DBCBC] hover:text-white">
|
||||
<span>خروج</span>
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<a asp-page="/login/Index" class="py-[0.54rem] w-[5.1rem] px-1 text-[0.8rem] font-[500] text-center bg-white border-2 border-[#2DBCBC] text-[#138F8F] rounded-md duration-500 ease-in-out hover:bg-[#2DBCBC] hover:text-white">
|
||||
<span>ورود</span>
|
||||
</a>
|
||||
<a asp-page="/register/Index" class="py-[0.54rem] w-[5.1rem] px-1 text-[0.8rem] font-[500] text-center bg-white border-2 border-[#2DBCBC] text-[#138F8F] rounded-md duration-500 ease-in-out hover:bg-[#2DBCBC] hover:text-white">
|
||||
<span>ثبت نام</span>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="relative z-[504]">
|
||||
<div id="menu-backdrop" class="fixed inset-0 bg-black/50 z-20 hidden transition-opacity duration-300" onclick="closeMenu()"></div>
|
||||
<aside id="menu-sidebar"
|
||||
class="fixed top-0 right-0 h-full w-[240px] bg-white transform translate-x-full transition-transform duration-300 z-30 dark:bg-[#171923]">
|
||||
<div class="flex flex-col h-full justify-between" style="padding: 15px;">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<div class="flex items-center gap-3">
|
||||
<img src="~/AssetsMain/images/logo.svg" class="w-9" alt="" srcset="">
|
||||
<div class="text-[#178C8C]">
|
||||
<div class="text-[0.9rem] font-[900]">گزارشگیر</div>
|
||||
<div class="text-[0.8rem] font-[700]">سامانه هوشمند منابع انسانی</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="gap-4 text-sm font-medium text-[#575757] dark:text-white">
|
||||
<li class="text-[0.8rem] font-[600] duration-300 ease-in-out my-1 hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]">
|
||||
<a asp-page="/Index" class="flex items-center gap-2 nav-link" style="padding: 3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 12.7595C5 11.4018 5 10.7229 5.27446 10.1262C5.54892 9.52943 6.06437 9.08763 7.09525 8.20401L8.09525 7.34687C9.95857 5.74974 10.8902 4.95117 12 4.95117C13.1098 4.95117 14.0414 5.74974 15.9047 7.34687L16.9047 8.20401C17.9356 9.08763 18.4511 9.52943 18.7255 10.1262C19 10.7229 19 11.4018 19 12.7595V16.9999C19 18.8856 19 19.8284 18.4142 20.4142C17.8284 20.9999 16.8856 20.9999 15 20.9999H9C7.11438 20.9999 6.17157 20.9999 5.58579 20.4142C5 19.8284 5 18.8856 5 16.9999V12.7595Z" stroke="currentColor"/>
|
||||
<path d="M14.5 21V16C14.5 15.4477 14.0523 15 13.5 15H10.5C9.94772 15 9.5 15.4477 9.5 16V21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span>صفحه اصلی</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="text-[0.8rem] font-[600] duration-300 ease-in-out my-1 hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]">
|
||||
<a href="#" class="flex items-center gap-2 nav-link" style="padding: 3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3" y="3" width="7" height="7" rx="1" stroke="currentColor" stroke-linecap="round"/>
|
||||
<rect x="3" y="14" width="7" height="7" rx="1" stroke="currentColor" stroke-linecap="round"/>
|
||||
<rect x="14" y="3" width="7" height="7" rx="1" stroke="currentColor" stroke-linecap="round"/>
|
||||
<path d="M17.5 14L17.5 21.0002" stroke="currentColor" stroke-linecap="round"/>
|
||||
<path d="M21 17.5L13.9998 17.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>خدمات</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="text-[0.8rem] font-[600] duration-300 ease-in-out my-1 hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]">
|
||||
<a href="#" class="flex items-center gap-2 nav-link" style="padding: 3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M20 12V17C20 18.8856 20 19.8284 19.4142 20.4142C18.8284 21 17.8856 21 16 21H6.5C5.11929 21 4 19.8807 4 18.5V18.5C4 17.1193 5.11929 16 6.5 16H16C17.8856 16 18.8284 16 19.4142 15.4142C20 14.8284 20 13.8856 20 12V7C20 5.11438 20 4.17157 19.4142 3.58579C18.8284 3 17.8856 3 16 3H8C6.11438 3 5.17157 3 4.58579 3.58579C4 4.17157 4 5.11438 4 7V18.5" stroke="currentColor"/>
|
||||
<path d="M9 8L15 8" stroke="currentColor" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>منابع دانش</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="text-[0.8rem] font-[600] duration-300 ease-in-out my-1 hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]">
|
||||
<a asp-page="/contact-us/Index" class="flex items-center gap-2 nav-link" style="padding: 3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="7.5" stroke="currentColor"/>
|
||||
<path d="M14.5 12C14.5 14.1651 14.1701 16.1029 13.6532 17.4813C13.394 18.1723 13.0975 18.6969 12.7936 19.0396C12.4892 19.383 12.2199 19.5 12 19.5C11.7801 19.5 11.5108 19.383 11.2064 19.0396C10.9025 18.6969 10.606 18.1723 10.3468 17.4813C9.82994 16.1029 9.5 14.1651 9.5 12C9.5 9.83494 9.82994 7.89713 10.3468 6.51871C10.606 5.82765 10.9025 5.30314 11.2064 4.96038C11.5108 4.61704 11.7801 4.5 12 4.5C12.2199 4.5 12.4892 4.61704 12.7936 4.96038C13.0975 5.30314 13.394 5.82765 13.6532 6.51871C14.1701 7.89713 14.5 9.83494 14.5 12Z" stroke="currentColor"/>
|
||||
<path d="M4.5 12H19.5" stroke="currentColor" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span>تماس با ما</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="text-[0.8rem] font-[600] duration-300 ease-in-out my-1 hover:text-[#282828] lg:text-[0.9rem] dark:hover:text-[#c9c9c9]">
|
||||
<a asp-page="/about-us/Index" class="flex items-center gap-2 nav-link" style="padding: 3px;">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 21V13M12 21L5.83752 16.5982C5.42695 16.305 5.22166 16.1583 5.11083 15.943C5 15.7276 5 15.4753 5 14.9708V8M12 21L18.1625 16.5982C18.573 16.305 18.7783 16.1583 18.8892 15.943C19 15.7276 19 15.4753 19 14.9708V8M12 13L5 8M12 13L19 8M5 8L10.8375 3.83034C11.3989 3.42938 11.6795 3.2289 12 3.2289C12.3205 3.2289 12.6011 3.42938 13.1625 3.83034L19 8" stroke="currentColor" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
<span>درباره ما</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="lineAuthSeparate dark:lineAuthSeparate"></div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-center flex-col gap-2">
|
||||
@if (User.Identity.IsAuthenticated)
|
||||
{
|
||||
<a href="@redirectDashboard" class="flex items-center justify-between gap-3 authBg dark:authBg">
|
||||
<div class="flex items-center gap-3">
|
||||
<svg class="avatar" width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="21" cy="14" r="7" fill="#27B0B0"/>
|
||||
<path d="M10.3497 26.9805C11.3367 24.2847 14.0217 22.75 16.8926 22.75H25.1074C27.9783 22.75 30.6633 24.2847 31.6503 26.9805C32.3775 28.9667 33.0698 31.4546 33.22 34.0005C33.2525 34.5518 32.8023 35 32.25 35H9.75C9.19771 35 8.74746 34.5518 8.78 34.0005C8.93024 31.4546 9.62253 28.9667 10.3497 26.9805Z" fill="#27B0B0"/>
|
||||
</svg>
|
||||
|
||||
<div>
|
||||
<div class="mobileAuth dark:mobileAuth">@currentAccount.Fullname</div>
|
||||
<div class="mobileAuth dark:mobileAuth">@currentAccount.WorkshopName</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<svg width="12" height="20" viewBox="0 0 12 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.25 1.5L1.75 10L10.25 18.5" stroke="#757575" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
|
||||
<a asp-page="/Index" asp-page-handler="Logout" class="flex items-center justify-center gap-3 authBg dark:authBg">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2 12L1.60957 11.6877L1.35969 12L1.60957 12.3123L2 12ZM11 12.5C11.2761 12.5 11.5 12.2761 11.5 12C11.5 11.7239 11.2761 11.5 11 11.5V12.5ZM5.60957 6.68765L1.60957 11.6877L2.39043 12.3123L6.39043 7.31235L5.60957 6.68765ZM1.60957 12.3123L5.60957 17.3123L6.39043 16.6877L2.39043 11.6877L1.60957 12.3123ZM2 12.5H11V11.5H2V12.5Z" fill="currentColor"/>
|
||||
<path d="M10 8.13193V7.38851C10 5.77017 10 4.961 10.474 4.4015C10.9479 3.84201 11.7461 3.70899 13.3424 3.44293L15.0136 3.1644C18.2567 2.62388 19.8782 2.35363 20.9391 3.25232C22 4.15102 22 5.79493 22 9.08276V14.9172C22 18.2051 22 19.849 20.9391 20.7477C19.8782 21.6464 18.2567 21.3761 15.0136 20.8356L13.3424 20.5571C11.7461 20.291 10.9479 20.158 10.474 19.5985C10 19.039 10 18.2298 10 16.6115V16.066" stroke="currentColor"/>
|
||||
</svg>
|
||||
<span>خروج</span>
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="authBgLog mb-2 dark:authBgLog">
|
||||
<a asp-page="/login/Index" class="px-1 text-[0.8rem] font-[500] text-center rounded-md duration-500 ease-in-out">
|
||||
<span>ورود</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="authBgLog dark:authBgLog">
|
||||
<a asp-page="/register/Index" class="px-1 text-[0.8rem] font-[500] text-center rounded-md duration-500 ease-in-out">
|
||||
<span>ثبت نام</span>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
setActiveClassByRoute('.nav-link');
|
||||
|
||||
function toggleMenu() {
|
||||
const sidebar = document.getElementById('menu-sidebar');
|
||||
const backdrop = document.getElementById('menu-backdrop');
|
||||
sidebar.classList.toggle('translate-x-full');
|
||||
backdrop.classList.toggle('hidden');
|
||||
}
|
||||
|
||||
function closeMenu() {
|
||||
const sidebar = document.getElementById('menu-sidebar');
|
||||
const backdrop = document.getElementById('menu-backdrop');
|
||||
sidebar.classList.add('translate-x-full');
|
||||
backdrop.classList.add('hidden');
|
||||
}
|
||||
|
||||
function setActiveClassByRoute(selector) {
|
||||
const currentPath = window.location.pathname;
|
||||
|
||||
document.querySelectorAll(selector).forEach(link => {
|
||||
const linkPath = link.getAttribute('href');
|
||||
|
||||
if (linkPath === currentPath) {
|
||||
link.classList.add('liActive');
|
||||
link.classList.add('dark:liActive');
|
||||
} else {
|
||||
link.classList.remove('liActive');
|
||||
link.classList.remove('dark:liActive');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -1,10 +1,5 @@
|
||||
@using Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||
|
||||
@{
|
||||
string styleVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
|
||||
|
||||
}
|
||||
@using Version = _0_Framework.Application.Version
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -18,10 +13,11 @@
|
||||
@RenderSection("head", false)
|
||||
|
||||
|
||||
<link href="~/AssetsClient/css/bootstrap.rtl.min.css?ver=@styleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/style.css?ver=@styleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/responsive.css?ver=@styleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/validation-style.css?ver=@styleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/bootstrap.rtl.min.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/style.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/responsive.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/validation-style.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/libs/select2/css/select2.min.css" rel="stylesheet" />
|
||||
|
||||
<script src="~/AssetsClient/js/jquery-3.7.1.min.js"></script>
|
||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||
@@ -42,7 +38,6 @@
|
||||
|
||||
<!-- Begin page -->
|
||||
@RenderBody()
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
@@ -50,17 +45,59 @@
|
||||
|
||||
|
||||
<script src="~/AssetsClient/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/AssetsClient/js/my-script.js?ver=@styleVersion"></script>
|
||||
<script src="~/AssetsClient/js/my-script.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/assetsclient/js/services/ajax-service.js"></script>
|
||||
<script src="~/AssetsClient/libs/select2/js/select2.js"></script>
|
||||
<script src="~/AssetsClient/libs/select2/js/i18n/fa.js"></script>
|
||||
|
||||
<script>
|
||||
//******************** رسپانسیو هنگام موبایل ********************
|
||||
$('#show_login').click(function() {
|
||||
$( ".bg-login" ).hide("slide", { direction: "left" }, 500);
|
||||
$('.login').removeClass('d-none');
|
||||
// $('.login').addClass('d-flex');
|
||||
$('.login').show("slide", { direction: "right" }, 500);
|
||||
});
|
||||
//******************** رسپانسیو هنگام موبایل ********************
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
//******************** رسپانسیو هنگام موبایل ********************
|
||||
$('#show_login').click(function() {
|
||||
$( ".bg-login" ).hide("slide", { direction: "left" }, 500);
|
||||
$('.login').removeClass('d-none');
|
||||
// $('.login').addClass('d-flex');
|
||||
$('.login').show("slide", { direction: "right" }, 500);
|
||||
});
|
||||
//******************** رسپانسیو هنگام موبایل ********************
|
||||
|
||||
// Override the global fetch function to handle errors
|
||||
$.ajaxSetup({
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.status === 500) {
|
||||
try {
|
||||
const errorData = jqXHR.responseJSON;
|
||||
$('.alert-msg').removeClass('d-none');
|
||||
$('.alert-msg').addClass('d-block');
|
||||
$('.alert-msg p').text(errorData.message || "خطای سمت سرور");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').addClass('d-none');
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
} catch (e) {
|
||||
$('.alert-msg').removeClass('d-none');
|
||||
$('.alert-msg').addClass('d-block');
|
||||
$('.alert-msg p').text("خطای سمت سرور");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').addClass('d-none');
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
console.error("Error parsing response:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
54
ServiceHost/Pages/Shared/_LayoutHome.cshtml
Normal file
54
ServiceHost/Pages/Shared/_LayoutHome.cshtml
Normal file
@@ -0,0 +1,54 @@
|
||||
@{
|
||||
string version = _0_Framework.Application.Version.StyleVersion;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="fa" dir="rtl">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" href="~/AssetsClient/images/favicon.ico">
|
||||
|
||||
<title>@ViewData["Title"] گزارشگیر </title>
|
||||
|
||||
<link href="~/AssetsClient/css/validation-style.css?ver=@version" rel="stylesheet" />
|
||||
<link href="~/assetsmain/css/styles.css?ver=@version" rel="stylesheet" />
|
||||
<link href="~/assetsmain/css/main.css?ver=@version" rel="stylesheet" />
|
||||
|
||||
@RenderSection("Head", false)
|
||||
|
||||
</head>
|
||||
|
||||
<body class="bg-[#F3F8FC] dark:bg-[#171923]">
|
||||
|
||||
<partial name="_Header"/>
|
||||
|
||||
@RenderBody()
|
||||
|
||||
<partial name="_Footer" />
|
||||
|
||||
<partial name="_validationAlert" />
|
||||
|
||||
<script src="~/AssetsClient/js/jquery-3.7.1.min.js"></script>
|
||||
<script src="~/assetsclient/js/darkmode.js"></script>
|
||||
<script src="~/assetsclient/js/services/ajax-service.js?ver=@version"></script>
|
||||
|
||||
<script>
|
||||
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;
|
||||
}
|
||||
</script>
|
||||
|
||||
@RenderSection("Script", false)
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
45
ServiceHost/Pages/Shared/_validationAlert.cshtml
Normal file
45
ServiceHost/Pages/Shared/_validationAlert.cshtml
Normal file
@@ -0,0 +1,45 @@
|
||||
<!-- پیغام خطا -->
|
||||
<div class="alert-msg" style="display:none">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="px-1">
|
||||
<h4 class="alert-msg-heading">خطا</h4>
|
||||
<p class="m-0"></p>
|
||||
</div>
|
||||
<button class="bg-transparent btn-alert-danger" id="closeAlert">
|
||||
<svg width="40" height="40" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="32" height="32" rx="16" fill="#D3D3D3" />
|
||||
<mask id="mask0_1503_13337" maskUnits="userSpaceOnUse" x="4" y="4" width="24" height="24">
|
||||
<rect x="4" y="4" width="24" height="24" fill="#D9D9D9" />
|
||||
</mask>
|
||||
<g mask="url(#mask0_1503_13337)">
|
||||
<path d="M12.4 21L16 17.4L19.6 21L21 19.6L17.4 16L21 12.4L19.6 11L16 14.6L12.4 11L11 12.4L14.6 16L11 19.6L12.4 21ZM16 26C14.6167 26 13.3167 25.7373 12.1 25.212C10.8833 24.6873 9.825 23.975 8.925 23.075C8.025 22.175 7.31267 21.1167 6.788 19.9C6.26267 18.6833 6 17.3833 6 16C6 14.6167 6.26267 13.3167 6.788 12.1C7.31267 10.8833 8.025 9.825 8.925 8.925C9.825 8.025 10.8833 7.31233 12.1 6.787C13.3167 6.26233 14.6167 6 16 6C17.3833 6 18.6833 6.26233 19.9 6.787C21.1167 7.31233 22.175 8.025 23.075 8.925C23.975 9.825 24.6873 10.8833 25.212 12.1C25.7373 13.3167 26 14.6167 26 16C26 17.3833 25.7373 18.6833 25.212 19.9C24.6873 21.1167 23.975 22.175 23.075 23.075C22.175 23.975 21.1167 24.6873 19.9 25.212C18.6833 25.7373 17.3833 26 16 26Z" fill="#F04248" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-msg absolute"></div>
|
||||
</div>
|
||||
<!-- پیغام خطا -->
|
||||
|
||||
<!-- پیغام موفق -->
|
||||
<div class="alert-success-msg" style="display:none">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="px-1">
|
||||
<h4 class="alert-msg-heading">موفق</h4>
|
||||
<p class="m-0"></p>
|
||||
</div>
|
||||
<button class="bg-transparent btn-alert-success" id="closeAlert">
|
||||
<svg width="40" height="40" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="32" height="32" rx="16" fill="#E5FFEF" />
|
||||
<mask id="mask0_222_9438" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="4" y="4" width="24" height="24">
|
||||
<rect x="4" y="4" width="24" height="24" fill="#D9D9D9"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_222_9438)">
|
||||
<path d="M14.6 20.6L21.65 13.55L20.25 12.15L14.6 17.8L11.75 14.95L10.35 16.35L14.6 20.6ZM16 26C14.6167 26 13.3167 25.7373 12.1 25.212C10.8833 24.6873 9.825 23.975 8.925 23.075C8.025 22.175 7.31267 21.1167 6.788 19.9C6.26267 18.6833 6 17.3833 6 16C6 14.6167 6.26267 13.3167 6.788 12.1C7.31267 10.8833 8.025 9.825 8.925 8.925C9.825 8.025 10.8833 7.31233 12.1 6.787C13.3167 6.26233 14.6167 6 16 6C17.3833 6 18.6833 6.26233 19.9 6.787C21.1167 7.31233 22.175 8.025 23.075 8.925C23.975 9.825 24.6873 10.8833 25.212 12.1C25.7373 13.3167 26 14.6167 26 16C26 17.3833 25.7373 18.6833 25.212 19.9C24.6873 21.1167 23.975 22.175 23.075 23.075C22.175 23.975 21.1167 24.6873 19.9 25.212C18.6833 25.7373 17.3833 26 16 26Z" fill="#00DF80"/>
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-success-msg absolute"></div>
|
||||
</div>
|
||||
<!-- پیغام موفق -->
|
||||
44
ServiceHost/Pages/about-us/Index.cshtml
Normal file
44
ServiceHost/Pages/about-us/Index.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@page
|
||||
@model ServiceHost.Pages.about_us.IndexModel
|
||||
@{
|
||||
Layout = "Shared/_LayoutHome";
|
||||
}
|
||||
|
||||
|
||||
<div class="py-1 relative dark:to-[#444C53]" style="margin: 80px 0 0 0;">
|
||||
<div class="max-w-screen-xl mx-auto text-center gap-6 p-9 z-10">
|
||||
<div class="text-[#178B8B] text-[0.9rem] font-medium dark:text-white">
|
||||
درباره با ما
|
||||
</div>
|
||||
<div class="text-[#3F3F3F] text-[1.1rem] font-[900] dark:text-white md:text-[1.4rem]">
|
||||
داستان گزارشگیر
|
||||
</div>
|
||||
<p class="text-[#666666] text-[0.8rem] font-[500] text-justify dark:text-white md:text-[0.9rem]">
|
||||
نرمافزار گزارشگیر، یک سامانه جامع و هوشمند در حوزه مدیریت منابع انسانی است که با هدف تسهیل و دقتبخشی به فرآیندهای کلیدی از جمله تنظیم قراردادهای کاری، صدور فیش حقوقی، ثبت تردد پرسنل، و انجام تصفیهحسابها طراحی و پیادهسازی شده است. این سامانه با بهرهگیری از فناوری تشخیص چهره و امکان استفاده از تلفن همراه بهعنوان ابزار ثبت حضور و غیاب، توانسته است جایگزینی کارآمد و دقیق برای روشهای سنتی و پرهزینه ارائه دهد؛ بدون نیاز به تجهیزات فیزیکی یا تخصص فنی از سوی کاربران.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="py-3 px-6 mb-9 max-w-screen-xl mx-auto">
|
||||
<div class="flex items-center gap-4 my-3">
|
||||
<div class="flex flex-col justify-between items-center gap-4 md:flex-row">
|
||||
<img src="~/assetsmain/images/rectangle-4729.png" class="w-full rounded-xl hidden md:w-80 lg:w-full" alt="" srcset="" style="width: 40%;">
|
||||
<p class="font-[600] text-[0.9rem] text-justify dark:text-white md:text-[0.95rem] lg:text-[1rem]">
|
||||
یکی از مزایای منحصربهفرد گزارشگیر، محاسبه دقیق و پویای پایه سنواتی در قراردادها و فیشهای حقوقی است. این موضوع، که در محاسبات حقوق و مزایا تأثیر مستقیم دارد، متأسفانه در بسیاری از نرمافزارهای مشابه داخلی نادیده گرفته شده یا بهصورت ایستا و نادرست لحاظ میگردد.
|
||||
<br />
|
||||
<br />
|
||||
مخاطبان هدف این سامانه، کلیه مجموعهها، کارگاهها و شرکتهایی هستند که دارای نیروی کار بوده و نیازمند سیستمی دقیق، سریع و قابل اتکا برای مدیریت حضور و غیاب، تنظیم قراردادهای قانونی و صدور فیش حقوقی میباشند.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-4 my-3" style="margin: 0 0 80px 0;">
|
||||
<div class="flex flex-col justify-between items-center gap-4 md:flex-row">
|
||||
<p class="font-[600] text-[0.9rem] text-justify dark:text-white md:text-[0.95rem] lg:text-[1rem]">
|
||||
سامانه گزارشگیر حاصل سالها تجربه میدانی و تلاش مستمر تیمی متخصص و متعهد در حوزههای برنامهنویسی، منابع انسانی و مشاوره حقوقی است. این نرمافزار با تکیه بر نیازهای واقعی کارفرمایان و قوانین جاری کار و تأمین اجتماعی طراحی شده تا پاسخی عملی، دقیق و منعطف به دغدغههای روزمره مدیران و صاحبان کسبوکار باشد.
|
||||
</p>
|
||||
<img src="~/assetsmain/images/rectangle-4730.png" class="w-full rounded-xl hidden md:w-80 lg:w-full" alt="" srcset="" style="width: 40%;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
12
ServiceHost/Pages/about-us/Index.cshtml.cs
Normal file
12
ServiceHost/Pages/about-us/Index.cshtml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Pages.about_us
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
105
ServiceHost/Pages/complaints/Index.cshtml
Normal file
105
ServiceHost/Pages/complaints/Index.cshtml
Normal file
@@ -0,0 +1,105 @@
|
||||
@page
|
||||
@model ServiceHost.Pages.complaints.IndexModel
|
||||
@{
|
||||
Layout = "Shared/_LayoutHome";
|
||||
string version = _0_Framework.Application.Version.StyleVersion;
|
||||
|
||||
<style>
|
||||
.sendBtn {
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
.sendBtn:hover {
|
||||
background: rgb(32 141 141);
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="py-3 relative bg-gradient-to-t from-[#E8E8E8]/30 to-[#F3F8FC] dark:to-[#444C53]">
|
||||
<div class="max-w-screen-xl mx-auto text-center gap-6 p-9 z-10">
|
||||
<div class="text-[#178B8B] text-[0.9rem] font-medium dark:text-white">
|
||||
ارتباط مستقیم با پشتیبانی گزارشگیر
|
||||
</div>
|
||||
<div class="text-[#3F3F3F] text-[1rem] font-[900] dark:text-white md:text-[1.2rem]">
|
||||
ارسال سوالات، درخواستها، گزارشهای فنی و شکایات از طریق فرم
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="py-3 px-6 max-w-screen-xl mx-auto">
|
||||
<div class="my-6">
|
||||
<div class="flex items-center gap-2 my-3">
|
||||
<svg class="min-w-9" width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M49.4325 41.2425C49.4325 42.0525 49.2525 42.885 48.87 43.695C48.4875 44.505 47.9925 45.27 47.34 45.99C46.2375 47.205 45.0225 48.0825 43.65 48.645C42.3 49.2075 40.8375 49.5 39.2625 49.5C36.9675 49.5 34.515 48.96 31.9275 47.8575C29.34 46.755 26.7525 45.27 24.1875 43.4025C21.6 41.5125 19.1475 39.42 16.8075 37.1025C14.49 34.7625 12.3975 32.31 10.53 29.745C8.685 27.18 7.2 24.615 6.12 22.0725C5.04 19.5075 4.5 17.055 4.5 14.715C4.5 13.185 4.77 11.7225 5.31 10.3725C5.85 9 6.705 7.74 7.8975 6.615C9.3375 5.1975 10.9125 4.5 12.5775 4.5C13.2075 4.5 13.8375 4.635 14.4 4.905C14.985 5.175 15.5025 5.58 15.9075 6.165L21.1275 13.5225C21.5325 14.085 21.825 14.6025 22.0275 15.0975C22.23 15.57 22.3425 16.0425 22.3425 16.47C22.3425 17.01 22.185 17.55 21.87 18.0675C21.5775 18.585 21.15 19.125 20.61 19.665L18.9 21.4425C18.6525 21.69 18.54 21.9825 18.54 22.3425C18.54 22.5225 18.5625 22.68 18.6075 22.86C18.675 23.04 18.7425 23.175 18.7875 23.31C19.1925 24.0525 19.89 25.02 20.88 26.19C21.8925 27.36 22.9725 28.5525 24.1425 29.745C25.3575 30.9375 26.5275 32.04 27.72 33.0525C28.89 34.0425 29.8575 34.7175 30.6225 35.1225C30.735 35.1675 30.87 35.235 31.0275 35.3025C31.2075 35.37 31.3875 35.3925 31.59 35.3925C31.9725 35.3925 32.265 35.2575 32.5125 35.01L34.2225 33.3225C34.785 32.76 35.325 32.3325 35.8425 32.0625C36.36 31.7475 36.8775 31.59 37.44 31.59C37.8675 31.59 38.3175 31.68 38.8125 31.8825C39.3075 32.085 39.825 32.3775 40.3875 32.76L47.835 38.0475C48.42 38.4525 48.825 38.925 49.0725 39.4875C49.2975 40.05 49.4325 40.6125 49.4325 41.2425Z" stroke="#9DDBDB" stroke-width="2.5" stroke-miterlimit="10" />
|
||||
<path d="M41.625 20.25C41.625 18.9 40.5675 16.83 38.9925 15.1425C37.5525 13.59 35.64 12.375 33.75 12.375" stroke="#23A8A8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M49.5 20.25C49.5 11.5425 42.4575 4.5 33.75 4.5" stroke="#23A8A8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
|
||||
<div>
|
||||
<div class="text-[#4F4F4F] text-[0.9rem] font-semibold dark:text-white">ثبت شکایات</div>
|
||||
<p class="text-[#4F4F4F] text-[0.8rem] dark:text-white">
|
||||
در صورتی که نسبت به عملکرد سامانه، خدمات ارائهشده یا نحوه پاسخگویی کارشناسان شکایتی دارید، میتوانید از طریق این بخش موضوع را ثبت و پیگیری نمایید. شکایات ثبتشده توسط تیم نظارت و پشتیبانی بررسی شده و نتیجه از طریق ایمیل یا پنل کاربری به اطلاع شما خواهد رسید.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="rounded-2xl shadow-lg w-full mx-auto bg-white p-4 border dark:bg-[#212330] dark:border-[#44475A] md:w-8/12 lg:w-6/12" id="formContact">
|
||||
<div class="grid grid-cols-1 gap-3 my-2 md:grid-cols-2">
|
||||
<div class="w-full">
|
||||
<label for="fname" class="text-[#52525B] text-[0.7rem] dark:text-white">نام<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px;" id="fname" name="Command.FirstName" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">نام را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="lname" class="text-[#52525B] text-[0.7rem] dark:text-white">نام خانوداگی<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px;" id="lname" name="Command.LastName" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">نام خانوادگی را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="email" class="text-[#52525B] text-[0.7rem] dark:text-white">ایمیل<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px; direction: ltr" id="email" name="Command.Email" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">ایمیل را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="phone" class="text-[#52525B] text-[0.7rem] dark:text-white">شماره همراه<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px; direction: ltr" id="phone" maxlength="11" name="Command.PhoneNumber" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">شماره همراه را وارد کنید.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="subject" class="text-[#52525B] text-[0.7rem] dark:text-white">موضوع<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px;" id="subject" name="Command.Title" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">موضوع را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full my-2" style="position: relative;">
|
||||
<textarea style="font-size: 12px;" placeholder="توضیحات ..." type="text" maxlength="500" id="description" name="Command.Message" rows="6" class="resize-none w-full rounded-xl p-2 text-[#11181C] border-2 border-[#E4E4E7] focus-visible:outline focus-visible:outline-[#B3B3B3]"></textarea>
|
||||
<span style="position: absolute;bottom: -15px;width: 53px;left: 0; " class="text-[#52525B] text-[0.7rem] dark:text-white"><span id="characterLeft">500</span> کاراکتر</span>
|
||||
<div class="flex justify-between text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]">
|
||||
<!-- <label for="description" class="text-[#52525B] text-[0.7rem] dark:text-white">پیام <span class="text-[#F31260]">*</span></label> -->
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">توضیحات را وارد کنید.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col justify-center items-center mt-6 space-y-3 md:flex-row md:justify-between">
|
||||
<div class="text-[#393939] text-[0.8rem] font-bold dark:text-white">
|
||||
<span class="text-[#F31260]">*</span> پر کردن قسمتهای ستارهدار ضروری است.
|
||||
</div>
|
||||
<button type="button" class="sendBtn bg-[#2DBCBC] py-2 px-1 w-28 text-white text-[0.75rem] rounded-lg flex items-center justify-center gap-2" onclick="saveContactUs()">
|
||||
<span>ارسال پیام</span>
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 3L2 6M2 6L5 9M2 6H9.5" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var ajax = new AjaxService(antiForgeryToken);
|
||||
var createAjaxUrl = `@Url.Page("./Index", "CreateAjax")`;
|
||||
</script>
|
||||
<script src="~/assetsmain/pages/complaints/js/index.js?ver=@version"></script>
|
||||
}
|
||||
30
ServiceHost/Pages/complaints/Index.cshtml.cs
Normal file
30
ServiceHost/Pages/complaints/Index.cshtml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using CompanyManagment.App.Contracts.ContactUs;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Pages.complaints
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IContactUsApplication _contactUsApplication;
|
||||
|
||||
public IndexModel(IContactUsApplication contactUsApplication)
|
||||
{
|
||||
_contactUsApplication = contactUsApplication;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateAjax(CreateContactUs command)
|
||||
{
|
||||
var operationResult = _contactUsApplication.Create(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = operationResult.IsSuccedded,
|
||||
message = operationResult.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
222
ServiceHost/Pages/contact-us/Index.cshtml
Normal file
222
ServiceHost/Pages/contact-us/Index.cshtml
Normal file
@@ -0,0 +1,222 @@
|
||||
@page
|
||||
@model ServiceHost.Pages.contact_us.IndexModel
|
||||
@{
|
||||
Layout = "Shared/_LayoutHome";
|
||||
string version = _0_Framework.Application.Version.StyleVersion;
|
||||
|
||||
<style>
|
||||
.sendBtn {
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
.sendBtn:hover {
|
||||
background: rgb(32 141 141);
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="py-3 relative bg-gradient-to-t from-[#E8E8E8]/30 to-[#F3F8FC] dark:to-[#444C53]">
|
||||
|
||||
<div class="max-w-screen-xl mx-auto text-center gap-6 p-9 z-10">
|
||||
<div class="text-[#178B8B] text-[0.9rem] font-medium dark:text-white">
|
||||
ارتباط مستقیم
|
||||
</div>
|
||||
<div class="text-[#3F3F3F] text-[1rem] font-[900] dark:text-white md:text-[1.2rem]">
|
||||
ارسال پیامها، درخواستها و گزارشهای مرتبط با گزارشگیر
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="gap-6 px-6 mx-6 z-10">
|
||||
<h6 class="text-[0.9rem] text-[#178B8B] font-bold dark:text-white">تماس با ما</h6>
|
||||
<h4 class="text-[1.6rem] text-[#3F3F3F] font-extrabold dark:text-white"> ارتباط پیوسته با گزارشگیر، در هر ساعت از شبانهروز</h4>
|
||||
<p class="text-[0.9rem] my-3 text-[#666666] font-medium dark:text-white">
|
||||
شرکت گزارشگیر در ساعات کاری پاسخگوی نیازها و پرسشهای شماست. شما میتوانید درخواستها، گزارشها و پیامهایتان را از طریق راههای ارتباطی درج شده در این صفحه برای ما ارسال کنید. کارشناسان ما در اولین فرصت پاسخگوی شما خواهند بود.
|
||||
</p>
|
||||
</div> -->
|
||||
<!-- <div class="grid grid-cols-1 mx-auto max-w-screen-lg my-3 gap-9 px-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-3 xl:grid-cols-3">
|
||||
<div class="group/item cursor-pointer flex flex-col justify-between gap-3 rounded-2xl p-4 bg-[#FBFDFF] border border-[#E3E3E3] duration-500 ease-in-out shadow-xl hover:border-[#178B8B] dark:bg-[#212330] dark:border-[#44475A]">
|
||||
<div class="flex items-center justify-between gap-3 space-x-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M25.927 24.2462L25.1678 25.0453C25.1678 25.0453 23.3635 26.945 18.4385 21.7598C13.5135 16.5747 15.3178 14.6751 15.3178 14.6751L15.7959 14.1719C16.9735 12.9321 17.0845 10.9416 16.0571 9.4885L13.9554 6.51602C12.6838 4.7175 10.2266 4.47992 8.76908 6.0144L6.15308 8.76857C5.43038 9.52943 4.94608 10.5158 5.00481 11.6099C5.15506 14.4091 6.35118 20.4317 13.0256 27.4587C20.1035 34.9103 26.7447 35.2065 29.4605 34.9385C30.3195 34.8537 31.0665 34.3905 31.6685 33.7567L34.0362 31.264C35.6343 29.5815 35.1837 26.697 33.1388 25.52L29.9547 23.6872C28.612 22.9143 26.9763 23.1413 25.927 24.2462Z" fill="#CDEBEB"/>
|
||||
<path d="M22.0992 3.13371C22.2095 2.45222 22.8537 1.98994 23.5352 2.10026C23.5773 2.10834 23.7132 2.13371 23.7842 2.14954C23.9265 2.18122 24.1248 2.22997 24.3722 2.30202C24.8668 2.44609 25.5578 2.68344 26.3872 3.06366C28.0477 3.82492 30.2573 5.15659 32.5503 7.44959C34.8433 9.74259 36.175 11.9523 36.9362 13.6127C37.3165 14.4421 37.5538 15.1331 37.6978 15.6277C37.7698 15.8751 37.8187 16.0735 37.8503 16.2157C37.8662 16.2868 37.8778 16.3439 37.8858 16.3861L37.8955 16.4381C38.0057 17.1195 37.5477 17.7905 36.8662 17.9008C36.1867 18.0108 35.5465 17.5507 35.4335 16.8725C35.43 16.8542 35.4203 16.8053 35.4102 16.7592C35.3895 16.6668 35.354 16.5205 35.2977 16.3269C35.1848 15.9396 34.989 15.3641 34.6637 14.6546C34.014 13.2374 32.8457 11.2805 30.7825 9.21736C28.7195 7.15426 26.7625 5.98594 25.3453 5.33622C24.6358 5.01096 24.0603 4.81507 23.673 4.70227C23.4795 4.64589 23.2362 4.59004 23.1438 4.56949C22.4655 4.45644 21.9892 3.81324 22.0992 3.13371Z" fill="#23A8A8"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.4762 8.88349C22.6658 8.21969 23.3577 7.83533 24.0215 8.02498L23.6782 9.22689C24.0215 8.02498 24.0215 8.02498 24.0215 8.02498L24.024 8.02568L24.0265 8.02641L24.032 8.02803L24.045 8.03189L24.078 8.04216C24.103 8.05019 24.1345 8.06066 24.1718 8.07394C24.2467 8.10051 24.3457 8.13828 24.467 8.19028C24.7098 8.29434 25.0415 8.45504 25.4492 8.69623C26.2648 9.17903 27.3785 9.98099 28.6868 11.2893C29.9952 12.5976 30.797 13.7112 31.2798 14.527C31.521 14.9345 31.6817 15.2663 31.7858 15.5091C31.8378 15.6304 31.8757 15.7294 31.9022 15.8042C31.9155 15.8416 31.9258 15.873 31.934 15.8981L31.9442 15.9311L31.948 15.944L31.9497 15.9496L31.9503 15.9522C31.9503 15.9522 31.9512 15.9546 30.7492 16.298L31.9512 15.9546C32.1408 16.6183 31.7563 17.3102 31.0927 17.4998C30.4345 17.6878 29.7487 17.3117 29.5522 16.6582L29.546 16.6402C29.5372 16.6152 29.5188 16.5659 29.488 16.4939C29.4263 16.35 29.3145 16.1146 29.1285 15.8003C28.7568 15.1724 28.0857 14.2236 26.919 13.057C25.7525 11.8905 24.8037 11.2193 24.1758 10.8477C23.8615 10.6616 23.6262 10.5498 23.4822 10.4881C23.4102 10.4573 23.3608 10.4389 23.3358 10.43L23.3178 10.4239C22.6645 10.2274 22.2882 9.54164 22.4762 8.88349Z" fill="#23A8A8"/>
|
||||
</svg>
|
||||
<div class="text-[0.8rem] font-extrabold text-[#138F8F] duration-300 group-hover/item:text-[#178B8B] dark:text-white md:text-[0.9rem] lg:text-[1rem] dark:group-hover/item:text-[#15BCBC]">تماس تلفنی</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p class="m-0 text-[#393939] text-[0.7rem] font-semibold dark:text-[#EDEDED] md:text-[0.8rem]">
|
||||
پاسخگویی به درخواستها از طریق مرکز تماس
|
||||
</p>
|
||||
<p class="m-0 text-[#138F8F] text-[0.75rem] font-normal dark:text-[#EDEDED]">
|
||||
<span>۰۱۳-۹۹۰۹۹۹۹۹</span>
|
||||
<span>۰۱۳-۹۹۹۹۹۹۹۹</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<button class="bg-[#2DBCBC] py-2 px-1 w-32 text-white text-[0.75rem] rounded-lg flex items-center justify-center gap-2">
|
||||
<span>ارتباط با پشتیبانی</span>
|
||||
<svg width="13" height="12" viewBox="0 0 9 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 1L1 4M1 4L4 7M1 4H8.5" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="group/item cursor-pointer flex flex-col justify-between gap-3 rounded-2xl p-4 bg-[#FBFDFF] border border-[#E3E3E3] duration-500 ease-in-out shadow-xl hover:border-[#178B8B] dark:bg-[#212330] dark:border-[#44475A]">
|
||||
<div class="flex items-center justify-between gap-3 space-x-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5812 35.8808L17.998 35.1768C18.666 34.0483 18.9998 33.4841 19.5318 33.1695C20.0638 32.8546 20.7578 32.8325 22.1457 32.7881C23.447 32.7465 24.3217 32.633 25.0695 32.3231C26.644 31.671 27.8948 30.4201 28.547 28.8456C29.0362 27.6648 29.0362 26.1678 29.0362 23.1738V21.8886C29.0362 17.6818 29.0362 15.5783 28.0893 14.0331C27.5595 13.1685 26.8325 12.4416 25.9678 11.9117C24.4227 10.9649 22.3193 10.9648 18.1125 10.9648H14.257C10.0502 10.9648 7.94681 10.9649 6.40163 11.9117C5.53701 12.4416 4.81008 13.1685 4.28023 14.0331C3.33334 15.5783 3.33334 17.6818 3.33334 21.8886V23.1738C3.33334 26.1678 3.33334 27.6648 3.82248 28.8456C4.47464 30.4201 5.72556 31.671 7.30004 32.3231C8.04786 32.633 8.92248 32.7465 10.2238 32.7881C11.6116 32.8325 12.3056 32.8546 12.8376 33.1695C13.3695 33.4841 13.7035 34.0483 14.3714 35.1768L14.7882 35.8808C15.4091 36.93 16.9603 36.93 17.5812 35.8808ZM21.8072 23.8163C22.6945 23.8163 23.4137 23.097 23.4137 22.2098C23.4137 21.3226 22.6945 20.6035 21.8072 20.6035C20.92 20.6035 20.2008 21.3226 20.2008 22.2098C20.2008 23.097 20.92 23.8163 21.8072 23.8163ZM17.7912 22.2098C17.7912 23.097 17.072 23.8163 16.1847 23.8163C15.2975 23.8163 14.5783 23.097 14.5783 22.2098C14.5783 21.3226 15.2975 20.6035 16.1847 20.6035C17.072 20.6035 17.7912 21.3226 17.7912 22.2098ZM10.5623 23.8163C11.4495 23.8163 12.1687 23.097 12.1687 22.2098C12.1687 21.3226 11.4495 20.6035 10.5623 20.6035C9.67506 20.6035 8.95583 21.3226 8.95583 22.2098C8.95583 23.097 9.67506 23.8163 10.5623 23.8163Z" fill="#CDEBEB"/>
|
||||
<path d="M25.2827 3.33398C27.2023 3.33397 28.7287 3.33397 29.9528 3.45035C31.2082 3.5697 32.2695 3.81988 33.2148 4.39923C34.1875 4.99532 35.0053 5.81312 35.6013 6.78582C36.1808 7.73125 36.431 8.79255 36.5503 10.0478C36.6667 11.272 36.6667 12.7985 36.6667 14.718V16.029C36.6667 17.3952 36.6667 18.4817 36.6065 19.3628C36.545 20.2642 36.4167 21.0383 36.1163 21.7632C35.3827 23.5343 33.9755 24.9417 32.2042 25.6753C32.1598 25.6937 32.1153 25.7115 32.0705 25.7285C31.8567 25.8103 31.6737 25.8803 31.5128 25.9325C31.5362 25.1512 31.5362 24.2612 31.5362 23.2568V21.7697C31.5362 19.767 31.5362 18.0893 31.4065 16.7255C31.2708 15.2976 30.9755 13.9577 30.2208 12.7263C29.4848 11.5252 28.4752 10.5155 27.2742 9.77948C26.0427 9.02487 24.7028 8.72953 23.2748 8.59378C21.911 8.4641 20.2333 8.46414 18.2307 8.46419H14.1388C12.7786 8.46415 11.5684 8.46413 10.5046 8.50473C10.5542 8.33298 10.6221 8.13612 10.7018 7.90505C10.8373 7.51202 11.0087 7.14034 11.2259 6.78582C11.822 5.81312 12.6398 4.99532 13.6125 4.39923C14.5579 3.81988 15.6192 3.5697 16.8745 3.45035C18.0987 3.33397 19.625 3.33397 21.5447 3.33398H25.2827Z" fill="#23A8A8"/>
|
||||
</svg>
|
||||
<div class="text-[0.8rem] font-extrabold text-[#138F8F] duration-300 group-hover/item:text-[#178B8B] dark:text-white md:text-[0.9rem] lg:text-[1rem] dark:group-hover/item:text-[#15BCBC]"> گفتگو با کارشناسان</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p class="m-0 text-[#393939] text-[0.7rem] font-semibold dark:text-[#EDEDED] md:text-[0.8rem]">
|
||||
گفتوگوی آنلاین با کارشناسان مرکز تماس از راه چت
|
||||
</p>
|
||||
<p class="invisible m-0 text-[#138F8F] text-[0.75rem] font-normal dark:text-[#EDEDED]">
|
||||
<span>...</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<button class="bg-[#2DBCBC] py-2 px-1 w-32 text-white text-[0.75rem] rounded-lg flex items-center justify-center gap-2">
|
||||
<span>ارسال پیام</span>
|
||||
<svg width="13" height="12" viewBox="0 0 9 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 1L1 4M1 4L4 7M1 4H8.5" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="group/item cursor-pointer flex flex-col justify-between gap-3 rounded-2xl p-4 bg-[#FBFDFF] border border-[#E3E3E3] duration-500 ease-in-out shadow-xl hover:border-[#178B8B] dark:bg-[#212330] dark:border-[#44475A]">
|
||||
<div class="flex items-center justify-between gap-3 space-x-3">
|
||||
<div class="flex items-center gap-3">
|
||||
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.66669 19.1199C6.66669 17.1153 6.66669 16.113 7.16452 15.3075C7.66235 14.5019 8.55887 14.0537 10.3519 13.1572L17.0185 9.82383C18.4817 9.09231 19.2132 8.72656 20 8.72656C20.7869 8.72656 21.5184 9.09231 22.9815 9.82383L29.6482 13.1572C31.4412 14.0537 32.3377 14.5019 32.8355 15.3075C33.3334 16.113 33.3334 17.1153 33.3334 19.1199V24.9998C33.3334 28.1424 33.3334 29.7138 32.357 30.6901C31.3807 31.6664 29.8094 31.6664 26.6667 31.6664H13.3334C10.1907 31.6664 8.6193 31.6664 7.643 30.6901C6.66669 29.7138 6.66669 28.1424 6.66669 24.9998V19.1199Z" fill="#CDEBEB"/>
|
||||
<path d="M6.66669 28.3328V17.0706C6.66669 16.8848 6.86227 16.764 7.02849 16.847L17.764 22.2148C19.1715 22.9186 20.8285 22.9186 22.236 22.2148L32.9715 16.847C33.1379 16.764 33.3334 16.8848 33.3334 17.0706V28.3328C33.3334 30.1738 31.841 31.6661 30 31.6661H10C8.15907 31.6661 6.66669 30.1738 6.66669 28.3328Z" fill="#23A8A8"/>
|
||||
</svg>
|
||||
<div class="text-[0.8rem] font-extrabold text-[#138F8F] duration-300 group-hover/item:text-[#178B8B] dark:text-white md:text-[0.9rem] lg:text-[1rem] dark:group-hover/item:text-[#15BCBC]">ارسال پیام</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<p class="m-0 text-[#393939] text-[0.7rem] font-semibold dark:text-[#EDEDED] md:text-[0.8rem]">
|
||||
دریافت پیامهای مکتوب شما از طریق ایمیل
|
||||
</p>
|
||||
<p class="m-0 text-[#138F8F] text-[0.75rem] text-left font-normal dark:text-[#EDEDED]">
|
||||
<span>callcenter@gozareshgir.ir</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<button class="bg-[#2DBCBC] py-2 px-1 w-32 text-white text-[0.75rem] rounded-lg flex items-center justify-center gap-2">
|
||||
<span>ارسال ایمیل</span>
|
||||
<svg width="13" height="12" viewBox="0 0 9 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 1L1 4M1 4L4 7M1 4H8.5" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
|
||||
<div class="py-3 px-6 max-w-screen-xl mx-auto" style="margin: 90px auto">
|
||||
@* <div class="my-6">
|
||||
<div class="flex items-center gap-2 my-3">
|
||||
<svg class="min-w-9" width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M49.4325 41.2425C49.4325 42.0525 49.2525 42.885 48.87 43.695C48.4875 44.505 47.9925 45.27 47.34 45.99C46.2375 47.205 45.0225 48.0825 43.65 48.645C42.3 49.2075 40.8375 49.5 39.2625 49.5C36.9675 49.5 34.515 48.96 31.9275 47.8575C29.34 46.755 26.7525 45.27 24.1875 43.4025C21.6 41.5125 19.1475 39.42 16.8075 37.1025C14.49 34.7625 12.3975 32.31 10.53 29.745C8.685 27.18 7.2 24.615 6.12 22.0725C5.04 19.5075 4.5 17.055 4.5 14.715C4.5 13.185 4.77 11.7225 5.31 10.3725C5.85 9 6.705 7.74 7.8975 6.615C9.3375 5.1975 10.9125 4.5 12.5775 4.5C13.2075 4.5 13.8375 4.635 14.4 4.905C14.985 5.175 15.5025 5.58 15.9075 6.165L21.1275 13.5225C21.5325 14.085 21.825 14.6025 22.0275 15.0975C22.23 15.57 22.3425 16.0425 22.3425 16.47C22.3425 17.01 22.185 17.55 21.87 18.0675C21.5775 18.585 21.15 19.125 20.61 19.665L18.9 21.4425C18.6525 21.69 18.54 21.9825 18.54 22.3425C18.54 22.5225 18.5625 22.68 18.6075 22.86C18.675 23.04 18.7425 23.175 18.7875 23.31C19.1925 24.0525 19.89 25.02 20.88 26.19C21.8925 27.36 22.9725 28.5525 24.1425 29.745C25.3575 30.9375 26.5275 32.04 27.72 33.0525C28.89 34.0425 29.8575 34.7175 30.6225 35.1225C30.735 35.1675 30.87 35.235 31.0275 35.3025C31.2075 35.37 31.3875 35.3925 31.59 35.3925C31.9725 35.3925 32.265 35.2575 32.5125 35.01L34.2225 33.3225C34.785 32.76 35.325 32.3325 35.8425 32.0625C36.36 31.7475 36.8775 31.59 37.44 31.59C37.8675 31.59 38.3175 31.68 38.8125 31.8825C39.3075 32.085 39.825 32.3775 40.3875 32.76L47.835 38.0475C48.42 38.4525 48.825 38.925 49.0725 39.4875C49.2975 40.05 49.4325 40.6125 49.4325 41.2425Z" stroke="#9DDBDB" stroke-width="2.5" stroke-miterlimit="10" />
|
||||
<path d="M41.625 20.25C41.625 18.9 40.5675 16.83 38.9925 15.1425C37.5525 13.59 35.64 12.375 33.75 12.375" stroke="#23A8A8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M49.5 20.25C49.5 11.5425 42.4575 4.5 33.75 4.5" stroke="#23A8A8" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
|
||||
<div>
|
||||
<div class="text-[#4F4F4F] text-[0.9rem] font-semibold dark:text-white">مرکز تماس</div>
|
||||
<p class="text-[#4F4F4F] text-[0.8rem] dark:text-white">مرکز تماس گزارشگیر در ساعات کاری پاسخگوی پرسشهای مشتریان در زمینههای فنی و مالی است. همچنین برای ارتباط با این بخش، میتوانید از طریق پنل کاربری خود تیکت ثبت کنید.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="rounded-2xl shadow-lg w-full mx-auto bg-white p-4 border dark:bg-[#212330] dark:border-[#44475A] md:w-8/12 lg:w-6/12" id="formContact">
|
||||
<div class="grid grid-cols-1 gap-3 my-2 md:grid-cols-2">
|
||||
<div class="w-full">
|
||||
<label for="fname" class="text-[#52525B] text-[0.7rem] dark:text-white">نام<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px;" id="fname" name="Command.FirstName" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">نام را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="lname" class="text-[#52525B] text-[0.7rem] dark:text-white">نام خانوداگی<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px;" id="lname" name="Command.LastName" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">نام خانوادگی را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="email" class="text-[#52525B] text-[0.7rem] dark:text-white">ایمیل<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px; direction: ltr" id="email" name="Command.Email" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">ایمیل را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="phone" class="text-[#52525B] text-[0.7rem] dark:text-white">شماره همراه<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px; direction: ltr" id="phone" maxlength="11" name="Command.PhoneNumber" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">شماره همراه را وارد کنید.</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="subject" class="text-[#52525B] text-[0.7rem] dark:text-white">موضوع<span class="text-[#F31260]">*</span></label>
|
||||
<input type="text" style="font-size: 13px;" id="subject" name="Command.Title" class="w-full rounded-xl p-2 text-[#11181C] border-2 outline-[#E4E4E7] focus:outline-[#B3B3B3]">
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">موضوع را وارد کنید.</div>
|
||||
</div>
|
||||
<div class="w-full my-2" style="position: relative;">
|
||||
<textarea style="font-size: 12px;" placeholder="توضیحات ..." type="text" maxlength="500" id="description" name="Command.Message" rows="6" class="resize-none w-full rounded-xl p-2 text-[#11181C] border-2 border-[#E4E4E7] focus-visible:outline focus-visible:outline-[#B3B3B3]"></textarea>
|
||||
<span style="position: absolute;bottom: -15px;width: 53px;left: 0; " class="text-[#52525B] text-[0.7rem] dark:text-white"><span id="characterLeft">500</span> کاراکتر</span>
|
||||
<div class="flex justify-between text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]">
|
||||
<!-- <label for="description" class="text-[#52525B] text-[0.7rem] dark:text-white">پیام <span class="text-[#F31260]">*</span></label> -->
|
||||
<div class="text-[#F31260] text-[0.8rem] font-bold dark:text-[#F695B7]" style="display: none">توضیحات را وارد کنید.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col justify-center items-center mt-6 space-y-3 md:flex-row md:justify-between">
|
||||
<div class="text-[#393939] text-[0.8rem] font-bold dark:text-white">
|
||||
<span class="text-[#F31260]">*</span> پر کردن قسمتهای ستارهدار ضروری است.
|
||||
</div>
|
||||
<button type="button" class="sendBtn bg-[#2DBCBC] py-2 px-1 w-28 text-white text-[0.75rem] rounded-lg flex items-center justify-center gap-2" onclick="saveContactUs()">
|
||||
<span>ارسال پیام</span>
|
||||
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5 3L2 6M2 6L5 9M2 6H9.5" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div> *@
|
||||
|
||||
|
||||
<div class="relative flex items-center w-full mx-auto bg-gradient-to-l to-[#004343] via-[#067A7A] from-[#003E3E] overflow-hidden rounded-2xl my-6 p-3 md:w-11/12 md:p-6 lg:w-10/12 lg:p-9">
|
||||
|
||||
<div class="absolute bottom-0 left-0" id="leftSvg"></div>
|
||||
<div class="absolute top-0 -right-6" id="rightSvg"></div>
|
||||
<div class="hidden absolute bottom-0 md:block" id="mapSvg"></div>
|
||||
|
||||
<div class="w-full" style="z-index: 10;">
|
||||
<div class="!text-white text-center font-extrabold text-[#1.4rem] md:text-start">نشانی گزارشگیر</div>
|
||||
<div class="flex flex-col items-center justify-between md:flex-row">
|
||||
<div class="!text-white font-medium text-center text-[#0.8rem] md:text-start">منطقه آزاد انزلی، مجتمع ونوس طبقه اول، قرفه ۵۵۰</div>
|
||||
<div class="text-center">
|
||||
<div class="!text-white font-medium text-[#0.8rem]">شماره تماس</div>
|
||||
<div class="!text-white font-medium text-[#0.8rem]"><span class="ss03">۰۱۳۳۲۳۲۸۸۸۶</span></div>
|
||||
<div class="!text-white font-medium text-[#0.8rem]"><span class="ss03">۰۱۳۳۲۳۲۸۸۸۷</span></div>
|
||||
<div class="!text-white font-medium text-[#0.8rem]"><span class="ss03">۰۱۳۳۳۲۴۴۹۲۶</span></div>
|
||||
<div class="!text-white font-medium text-[#0.8rem]"><span class="ss03">۰۱۳۳۳۲۳۸۷۷۷</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@section Script {
|
||||
<script>
|
||||
// var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
// var ajax = new AjaxService(antiForgeryToken);
|
||||
// var createAjaxUrl = `@Url.Page("./Index", "CreateAjax")`;
|
||||
</script>
|
||||
<script src="~/assetsmain/pages/contact-us/js/index.js?ver=@version"></script>
|
||||
}
|
||||
30
ServiceHost/Pages/contact-us/Index.cshtml.cs
Normal file
30
ServiceHost/Pages/contact-us/Index.cshtml.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using CompanyManagment.App.Contracts.ContactUs;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Pages.contact_us
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IContactUsApplication _contactUsApplication;
|
||||
|
||||
public IndexModel(IContactUsApplication contactUsApplication)
|
||||
{
|
||||
_contactUsApplication = contactUsApplication;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateAjax(CreateContactUs command)
|
||||
{
|
||||
var operationResult = _contactUsApplication.Create(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = operationResult.IsSuccedded,
|
||||
message = operationResult.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
695
ServiceHost/Pages/login/Index.cshtml
Normal file
695
ServiceHost/Pages/login/Index.cshtml
Normal file
@@ -0,0 +1,695 @@
|
||||
@page
|
||||
@model ServiceHost.Pages.login.IndexModel
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
@{
|
||||
ViewData["Title"] = "ورود";
|
||||
}
|
||||
@section head
|
||||
{
|
||||
@* <link rel="manifest" href="/manifest.webmanifest" /> *@
|
||||
<meta name="theme-color" content="#ffffff" />
|
||||
|
||||
<meta name="description" content="گزارشگیر - خوش آمدید به دنیای پرانرژی سامانه هوشمند مدیریت منابع انسانی. ما خوشحالیم که شما را در اینجا میبینیم." />
|
||||
<meta name="keywords" content="گزارشگیر, گزارش گیر, گزارش" />
|
||||
<meta property="og:title" content="گزارشگیر" />
|
||||
<meta property="og:site_name" content="گزارشگیر">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:description" content="گزارشگیر - خوش آمدید به دنیای پرانرژی سامانه هوشمند مدیریت منابع انسانی. ما خوشحالیم که شما را در اینجا میبینیم." />
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:url" content="https://gozareshgir.ir" />
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@@context": "https://schema.org",
|
||||
"@@type": "Organization",
|
||||
"name": "گزارشگیر",
|
||||
"url": "https://gozareshgir.ir",
|
||||
"logo": "https://gozareshgir.ir"
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row position-relative">
|
||||
|
||||
<div class="col-xl-3 col-lg-5 login order-2 order-lg-1 d-lg-flex" style="display: none">
|
||||
<div class="custom-login mx-2">
|
||||
<div class="text-center mb-5">
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 621.6 721.91" style="width:150px;">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: url(#linear-gradient-2);
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: url(#linear-gradient-3);
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: url(#linear-gradient);
|
||||
}
|
||||
</style>
|
||||
<linearGradient id="linear-gradient" x1="0" y1="481.82" x2="621.6" y2="481.82" gradientUnits="userSpaceOnUse">
|
||||
<stop offset="0" stop-color="#30c1c1"/>
|
||||
<stop offset="1" stop-color="#087474"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="linear-gradient-2" x1="217.07" y1="187.47" x2="523.83" y2="187.47" xlink:href="#linear-gradient"/>
|
||||
<linearGradient id="linear-gradient-3" x1="1.3" y1="146.6" x2="395.56" y2="146.6" xlink:href="#linear-gradient"/>
|
||||
</defs>
|
||||
<polygon class="cls-3" points="0 328.82 129.91 244.95 129.91 453.87 310.8 562.4 488.4 453.87 488.4 355.2 310.8 355.2 488.4 241.73 621.6 241.73 621.6 541.02 310.8 721.91 0 541.02 0 328.82"/>
|
||||
<polygon class="cls-1" points="217.07 309.16 217.07 192.4 426.8 65.78 523.83 123.33 217.07 309.16"/>
|
||||
<polyline class="cls-2" points="308.61 0 395.56 47.69 1.3 293.19 1.3 184.66 308.61 0"/>
|
||||
</svg>
|
||||
@* <img src="~/AssetsClient/images/" alt="LOGO" class="img-fluid"> *@
|
||||
</div>
|
||||
|
||||
<div class="w-100" id="loginWithUser">
|
||||
<form autocomplete="off" metod="post" asp-page="./Index" asp-page-handler="Enter">
|
||||
|
||||
<div class="login-user-pass">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" id="username" asp-for="Username" placeholder="نام کاربری">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="position-relative">
|
||||
<input type="password" class="form-control" asp-for="Password" id="password" placeholder="گذرواژه">
|
||||
<button type="button" class="position-absolute end-0 bg-transparent" onclick="passFunction()" style="top:3px;">
|
||||
<svg class="eyeShow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.58 11.9999C15.58 13.9799 13.98 15.5799 12 15.5799C10.02 15.5799 8.42004 13.9799 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C13.98 8.41992 15.58 10.0199 15.58 11.9999Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M12 20.27C15.53 20.27 18.82 18.19 21.11 14.59C22.01 13.18 22.01 10.81 21.11 9.39997C18.82 5.79997 15.53 3.71997 12 3.71997C8.46997 3.71997 5.17997 5.79997 2.88997 9.39997C1.98997 10.81 1.98997 13.18 2.88997 14.59C5.17997 18.19 8.46997 20.27 12 20.27Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
<svg class="eyeClose" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="display:none;">
|
||||
<path d="M14.53 9.46992L9.47004 14.5299C8.82004 13.8799 8.42004 12.9899 8.42004 11.9999C8.42004 10.0199 10.02 8.41992 12 8.41992C12.99 8.41992 13.88 8.81992 14.53 9.46992Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M17.82 5.76998C16.07 4.44998 14.07 3.72998 12 3.72998C8.46997 3.72998 5.17997 5.80998 2.88997 9.40998C1.98997 10.82 1.98997 13.19 2.88997 14.6C3.67997 15.84 4.59997 16.91 5.59997 17.77" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M8.42004 19.5299C9.56004 20.0099 10.77 20.2699 12 20.2699C15.53 20.2699 18.82 18.1899 21.11 14.5899C22.01 13.1799 22.01 10.8099 21.11 9.39993C20.78 8.87993 20.42 8.38993 20.05 7.92993" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M15.5099 12.7C15.2499 14.11 14.0999 15.26 12.6899 15.52" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M9.47 14.53L2 22" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path d="M22 2L14.53 9.47" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<div class="recover-pass">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 19 19" fill="none">
|
||||
<g clip-path="url(#clip0_222_1674)">
|
||||
<path d="M13.4582 7.12484V3.95817C13.4582 3.54232 13.3558 3.13053 13.1569 2.74633C12.9579 2.36214 12.6664 2.01305 12.2988 1.719C11.9312 1.42495 11.4949 1.19169 11.0146 1.03255C10.5344 0.873413 10.0196 0.791504 9.49984 0.791504C8.98003 0.791504 8.4653 0.873413 7.98505 1.03255C7.50481 1.19169 7.06844 1.42495 6.70087 1.719C6.33331 2.01305 6.04174 2.36214 5.84281 2.74633C5.64388 3.13053 5.5415 3.54232 5.5415 3.95817V7.12484M13.4582 7.12484H16.6248C17.4993 7.12484 18.2082 7.83373 18.2082 8.70817V16.6248C18.2082 17.4993 17.4993 18.2082 16.6248 18.2082H2.37484C1.50039 18.2082 0.791504 17.4993 0.791504 16.6248V8.70817C0.791504 7.83373 1.50039 7.12484 2.37484 7.12484H5.5415M13.4582 7.12484H5.5415M9.49984 13.4582C9.93706 13.4582 10.2915 13.1037 10.2915 12.6665C10.2915 12.2293 9.93706 11.8748 9.49984 11.8748C9.06262 11.8748 8.70817 12.2293 8.70817 12.6665C8.70817 13.1037 9.06262 13.4582 9.49984 13.4582ZM9.49984 13.4582V15.0415" stroke="#018E8E" stroke-width="1.5" stroke-linecap="round" />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_222_1674">
|
||||
<rect width="19" height="19" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<a href="">فراموشی کلمه عبور</a>
|
||||
</div>*@
|
||||
|
||||
<div class="text-center mx-auto px-4 mt-4">
|
||||
<button type="submit" class="btn-login d-block mx-auto w-100" id="btn-login">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<span class="py-1">ورود</span>
|
||||
<div class="text-center loading ms-2" style="display: none;">
|
||||
<div class="spinner-border" role="status" style="width: 18px;height: 18px;padding: 0;margin: 4px 0 0 0;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<p>
|
||||
<a href="#" class="bg-transparent" id="loginWithMobileClick">ورود با شماره موبایل</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@* <input type="hidden" asp-for="CaptchaResponse" id="captchaRes" value="" /> *@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="w-100 d-none" id="loginWithMobile">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="شماره موبایل" id="phoneNumber">
|
||||
<div class="form-group " id="appendCodeInput"></div>
|
||||
</div>
|
||||
<div id="codeDiv" style="display: none">
|
||||
<div class="otp">
|
||||
<input type="text" id="n0" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" autofocus data-next="1">
|
||||
<input type="text" id="n1" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="2">
|
||||
<input type="text" id="n2" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="3">
|
||||
<input type="text" id="n3" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="4">
|
||||
<input type="text" id="n4" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="5">
|
||||
<input type="text" id="n5" class="form-control codeInput" placeholder="-" maxlength="1" autocomplete="off" data-next="end">
|
||||
</div>
|
||||
<div class="text-center mt-3">
|
||||
<div><p class="m-0">کد دریافتی را وارد کنید</p></div>
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<p class="mx-1">زمان باقی مانده تا انقضاء کد دریافتی</p>
|
||||
</div>
|
||||
<p class="countdown" id="timer"></p>
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="text-center loading" style="display:none">
|
||||
<div class="spinner-border" role="status">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div> *@
|
||||
<div class="w-100"></div>
|
||||
<div class="text-center mx-auto px-4 mt-4">
|
||||
<button class="btn-login w-100" id="btnSmsReciver">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<span class="py-1">دریافت کد</span>
|
||||
<div class="text-center loading ms-2" style="display: none;">
|
||||
<div class="spinner-border" role="status" style="width: 18px;height: 18px;padding: 0;margin: 4px 0 0 0;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button class="btn-login w-100" style="display: none" onclick="confirmCodeToLogin()" id="btn-login-code">
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<span class="py-1">ورود</span>
|
||||
<div class="text-center loading ms-2" style="display: none;">
|
||||
<div class="spinner-border" role="status" style="width: 18px;height: 18px;padding: 0;margin: 4px 0 0 0;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<p>
|
||||
<button class="bg-transparent" id="loginWithUserClick">ورود با نام کاربری و رمز عبور</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (Model.HasApkToDownload)
|
||||
{
|
||||
<div class="position-fixed d-md-none d-block" style="bottom:18px;" id="downloadAppLogin">
|
||||
<a href="/apk/android" type="button" class="btn-login d-block mx-auto w-100 text-white px-3 py-2 d-flex align-items-center">
|
||||
<svg width="18" height="18" fill="#ffffff" viewBox="-1 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="SVGRepo_bgCarrier" stroke-width="0"></g>
|
||||
<g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g>
|
||||
<g id="SVGRepo_iconCarrier">
|
||||
<path d="m3.751.61 13.124 7.546-2.813 2.813zm-2.719-.61 12.047 12-12.046 12c-.613-.271-1.033-.874-1.033-1.575 0-.023 0-.046.001-.068v.003-20.719c-.001-.019-.001-.042-.001-.065 0-.701.42-1.304 1.022-1.571l.011-.004zm19.922 10.594c.414.307.679.795.679 1.344 0 .022 0 .043-.001.065v-.003c.004.043.007.094.007.145 0 .516-.25.974-.636 1.258l-.004.003-2.813 1.593-3.046-2.999 3.047-3.047zm-17.203 12.796 10.312-10.359 2.813 2.813z"></path>
|
||||
</g>
|
||||
</svg>
|
||||
<span class="mx-1">دانلود نرم افزار مخصوص موبایل</span>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-xl-9 col-lg-7 bg-login order-1 order-lg-2" style="display: none">
|
||||
|
||||
<a href="/" class="back-btn position-absolute d-flex align-items-center gap-1 py-1 px-3 rounded-pill" type="button" style="top: 16px; left: 16px;">
|
||||
<svg width="24" height="24" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.83509 9.28281C4.5835 9.82982 4.5835 10.4521 4.5835 11.6967V15.5838C4.5835 17.3122 4.5835 18.1765 5.12047 18.7135C5.59815 19.1911 6.33482 19.2439 7.7085 19.2497V14.6672C7.7085 13.6086 8.56662 12.7505 9.62516 12.7505H12.3752C13.4337 12.7505 14.2918 13.6086 14.2918 14.6672V19.2497C15.6655 19.2439 16.4022 19.1911 16.8799 18.7135C17.4168 18.1765 17.4168 17.3122 17.4168 15.5838V11.6967C17.4168 10.4521 17.4168 9.82982 17.1652 9.28281C16.9136 8.7358 16.4412 8.33081 15.4962 7.52083L14.5795 6.73511C12.8715 5.27108 12.0175 4.53906 11.0002 4.53906C9.98287 4.53906 9.12885 5.27108 7.42081 6.73512L6.50414 7.52083C5.55916 8.33081 5.08668 8.7358 4.83509 9.28281ZM12.2918 19.2504V14.7505H9.7085V19.2504H12.2918Z" fill="white"/>
|
||||
</svg>
|
||||
<span>بازگشت به خانه</span>
|
||||
</a>
|
||||
|
||||
<div>
|
||||
<h4>سلام کاربر گرامی</h4>
|
||||
<p>
|
||||
خوش آمدید به دنیای پرانرژی سامانه هوشمند مدیریت منابع انسانی.
|
||||
ما خوشحالیم که شما را در اینجا میبینیم.
|
||||
</p>
|
||||
<button class="bg-transparent d-block d-lg-none" id="show_login">
|
||||
<div class="next ">
|
||||
<svg width="38" height="38" viewBox="0 0 38 38" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.25 9.5L23.75 19L14.25 28.5" stroke="white" stroke-width="2"/>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.Mess == null)
|
||||
{
|
||||
<script>
|
||||
var hasWelcomeLoginPage = localStorage.getItem('hasWelcomeLoginPage');
|
||||
if ($(window).width() < 991) {
|
||||
if (!hasWelcomeLoginPage) {
|
||||
$('.bg-login').show();
|
||||
} else {
|
||||
$('.login').show("slide", { direction: "right" }, 500);
|
||||
}
|
||||
} else {
|
||||
$('.bg-login').show();
|
||||
}
|
||||
</script>
|
||||
}
|
||||
else
|
||||
{
|
||||
<script>
|
||||
var hasWelcomeLoginPage = localStorage.getItem('hasWelcomeLoginPage');
|
||||
if ($(window).width() > 991) {
|
||||
$('.bg-login').show();
|
||||
} else {
|
||||
if (!hasWelcomeLoginPage) {
|
||||
$('.bg-login').show();
|
||||
} else {
|
||||
$('.login').show("slide", { direction: "right" }, 500);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- پیغام خطا -->
|
||||
@if (@Model.Mess != null)
|
||||
{
|
||||
<div class="alert-msg">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div class="px-1">
|
||||
<h4 class="alert-msg-heading">خطا</h4>
|
||||
<p class="m-0">@Model.Mess</p>
|
||||
</div>
|
||||
<button class="bg-transparent btn-alert-danger" id="closeAlert">
|
||||
<svg width="40" height="40" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="32" height="32" rx="16" fill="#D3D3D3" />
|
||||
<mask id="mask0_1503_13337" maskUnits="userSpaceOnUse" x="4" y="4" width="24" height="24">
|
||||
<rect x="4" y="4" width="24" height="24" fill="#D9D9D9" />
|
||||
</mask>
|
||||
<g mask="url(#mask0_1503_13337)">
|
||||
<path d="M12.4 21L16 17.4L19.6 21L21 19.6L17.4 16L21 12.4L19.6 11L16 14.6L12.4 11L11 12.4L14.6 16L11 19.6L12.4 21ZM16 26C14.6167 26 13.3167 25.7373 12.1 25.212C10.8833 24.6873 9.825 23.975 8.925 23.075C8.025 22.175 7.31267 21.1167 6.788 19.9C6.26267 18.6833 6 17.3833 6 16C6 14.6167 6.26267 13.3167 6.788 12.1C7.31267 10.8833 8.025 9.825 8.925 8.925C9.825 8.025 10.8833 7.31233 12.1 6.787C13.3167 6.26233 14.6167 6 16 6C17.3833 6 18.6833 6.26233 19.9 6.787C21.1167 7.31233 22.175 8.025 23.075 8.925C23.975 9.825 24.6873 10.8833 25.212 12.1C25.7373 13.3167 26 14.6167 26 16C26 17.3833 25.7373 18.6833 25.212 19.9C24.6873 21.1167 23.975 22.175 23.075 23.075C22.175 23.975 21.1167 24.6873 19.9 25.212C18.6833 25.7373 17.3833 26 16 26Z" fill="#F04248" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-msg position-absolute"></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="alert-msg d-none">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div class="px-1">
|
||||
<h4 class="alert-msg-heading">خطا</h4>
|
||||
<p class="m-0"></p>
|
||||
</div>
|
||||
<button class="bg-transparent btn-alert-danger" id="closeAlert">
|
||||
<svg width="40" height="40" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="32" height="32" rx="16" fill="#D3D3D3" />
|
||||
<mask id="mask0_1503_13337" maskUnits="userSpaceOnUse" x="4" y="4" width="24" height="24">
|
||||
<rect x="4" y="4" width="24" height="24" fill="#D9D9D9" />
|
||||
</mask>
|
||||
<g mask="url(#mask0_1503_13337)">
|
||||
<path d="M12.4 21L16 17.4L19.6 21L21 19.6L17.4 16L21 12.4L19.6 11L16 14.6L12.4 11L11 12.4L14.6 16L11 19.6L12.4 21ZM16 26C14.6167 26 13.3167 25.7373 12.1 25.212C10.8833 24.6873 9.825 23.975 8.925 23.075C8.025 22.175 7.31267 21.1167 6.788 19.9C6.26267 18.6833 6 17.3833 6 16C6 14.6167 6.26267 13.3167 6.788 12.1C7.31267 10.8833 8.025 9.825 8.925 8.925C9.825 8.025 10.8833 7.31233 12.1 6.787C13.3167 6.26233 14.6167 6 16 6C17.3833 6 18.6833 6.26233 19.9 6.787C21.1167 7.31233 22.175 8.025 23.075 8.925C23.975 9.825 24.6873 10.8833 25.212 12.1C25.7373 13.3167 26 14.6167 26 16C26 17.3833 25.7373 18.6833 25.212 19.9C24.6873 21.1167 23.975 22.175 23.075 23.075C22.175 23.975 21.1167 24.6873 19.9 25.212C18.6833 25.7373 17.3833 26 16 26Z" fill="#F04248" />
|
||||
</g>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="border-msg position-absolute"></div>
|
||||
</div>
|
||||
<!-- پیغام خطا -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<input type="hidden" id="Verfyusername"/>
|
||||
<input type="hidden" id="VerfyId"/>
|
||||
|
||||
|
||||
|
||||
@section Script{
|
||||
@* <script src="https://www.google.com/recaptcha/api.js?hl=fa&render=6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH"></script> *@
|
||||
@* <script>'serviceWorker' in navigator && navigator.serviceWorker.register('/service-worker.js')</script> *@
|
||||
<script>
|
||||
// if ('serviceWorker' in navigator) {
|
||||
// navigator.serviceWorker.register('/service-worker.js')
|
||||
// .then(function (registration) {
|
||||
// console.log('Service Worker registered with scope:', registration.scope);
|
||||
// alert('Service Worker registered with scope:' + registration.scope);
|
||||
// }).catch(function (error) {
|
||||
// console.log('Service Worker registration failed:', error);
|
||||
// alert('Service Worker registration failed:' + error);
|
||||
// });
|
||||
// }
|
||||
|
||||
// if ('serviceWorker' in navigator && 'PushManager' in window) {
|
||||
// window.addEventListener('beforeinstallprompt', (e) => {
|
||||
// if (localStorage.getItem('pwaPromptDismissed') === 'true') {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// e.preventDefault();
|
||||
|
||||
// const deferredPrompt = e;
|
||||
|
||||
// const containerDiv = document.createElement('div');
|
||||
// containerDiv.className = 'prompt-container';
|
||||
|
||||
// const promptText = document.createElement('p');
|
||||
// promptText.textContent = 'آیا می خواهید برنامه را نصب کنید؟';
|
||||
// containerDiv.appendChild(promptText);
|
||||
|
||||
// const yesButton = document.createElement('button');
|
||||
// yesButton.textContent = 'بله';
|
||||
// yesButton.classList.add('btn-grad');
|
||||
// yesButton.style.background = '#84cc16';
|
||||
|
||||
// const noButton = document.createElement('button');
|
||||
// noButton.textContent = 'خیر';
|
||||
// noButton.classList.add('btn-grad');
|
||||
// noButton.style.background = '#ef4444';
|
||||
|
||||
// yesButton.addEventListener('click', () => {
|
||||
// deferredPrompt.prompt();
|
||||
|
||||
// deferredPrompt.userChoice.then(choiceResult => {
|
||||
// if (choiceResult.outcome === 'accepted') {
|
||||
// console.log('App installed');
|
||||
// } else {
|
||||
// console.log('App installation declined');
|
||||
// }
|
||||
|
||||
// containerDiv.style.display = 'none';
|
||||
// });
|
||||
// });
|
||||
|
||||
// noButton.addEventListener('click', () => {
|
||||
// console.log('App installation declined');
|
||||
// containerDiv.style.display = 'none';
|
||||
// localStorage.setItem('pwaPromptDismissed', 'true');
|
||||
// });
|
||||
|
||||
// containerDiv.appendChild(yesButton);
|
||||
// containerDiv.appendChild(noButton);
|
||||
|
||||
// document.body.appendChild(containerDiv);
|
||||
// });
|
||||
// }
|
||||
</script>
|
||||
<script>
|
||||
// window.grecaptcha.ready(function () {
|
||||
// window.grecaptcha.execute('6Lfhp_AnAAAAAB79WkrMoHd1k8ir4m8VvfjE7FTH', { action: 'submit' }).then(function (response) {
|
||||
// $('#captchaRes').val(response);
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
|
||||
|
||||
//******************** رسپانسیو هنگام موبایل ********************
|
||||
$('#show_login').click(function () {
|
||||
$(".bg-login").hide("slide", { direction: "left" }, 500);
|
||||
$('.login').hide();
|
||||
// $('.login').addClass('d-flex');
|
||||
$('.login').show("slide", { direction: "right" }, 500);
|
||||
localStorage.setItem('hasWelcomeLoginPage', true);
|
||||
});
|
||||
//******************** رسپانسیو هنگام موبایل ********************
|
||||
|
||||
//******************** ورود با موبایل یا یوزر ********************
|
||||
$('#loginWithMobileClick').click(function () {
|
||||
$("#loginWithUser").addClass('d-none');
|
||||
$("#loginWithMobile").removeClass('d-none');
|
||||
$("#loginWithMobile").addClass('d-block');
|
||||
});
|
||||
|
||||
$('#loginWithUserClick').click(function () {
|
||||
$("#loginWithUser").removeClass('d-none');
|
||||
$("#loginWithUser").addClass('d-block');
|
||||
$("#loginWithMobile").removeClass('d-block');
|
||||
$("#loginWithMobile").addClass('d-none');
|
||||
});
|
||||
//******************** ورود با موبایل یا یوزر ********************
|
||||
|
||||
|
||||
//******************** بستن مودال خطا ********************
|
||||
$(document).on('click', '#closeAlert', function () {
|
||||
$('.alert-msg').removeClass('d-flex');
|
||||
$('.alert-msg').addClass('d-none');
|
||||
$('.alert-msg p').text('');
|
||||
});
|
||||
|
||||
$(document).on('click', '#closeAlert1', function () {
|
||||
$('.alert-msg').removeClass('d-flex');
|
||||
$('.alert-msg').addClass('d-none');
|
||||
$('.alert-msg p').text('');
|
||||
});
|
||||
//******************** بستن مودال خطا ********************
|
||||
|
||||
|
||||
//******************** لودینگ صفحه هنگام ورود با یوزر و رمز عبور ********************
|
||||
$(document).on('click', '#btn-login', function () {
|
||||
$('.loading').show();
|
||||
});
|
||||
//******************** لودینگ صفحه هنگام ورود با یوزر و رمز عبور ********************
|
||||
|
||||
|
||||
//******************** عملیات ورود با موبایل و دریافت کد ********************
|
||||
//فقط عدد وارد کنه
|
||||
$('#code').on('keyup',
|
||||
function () {
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
});
|
||||
$('#phoneNumber').on('keyup keypress',
|
||||
function (e) {
|
||||
//فقط عدد
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
if (this.value.length == 11) {
|
||||
//کلید دمکه اینتر 13
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
$('#btnSmsReciver').click();
|
||||
}
|
||||
|
||||
$('#phoneNumber').removeClass("invalidPass");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#btnSmsReciver').on('click',
|
||||
function () {
|
||||
var phoneInput = $('#phoneNumber').val();
|
||||
if (phoneInput.length == 0) {
|
||||
$('.alert-msg').removeClass('d-none');
|
||||
$('.alert-msg p').text('لطفا شماره موبایل را وارد نمائید');
|
||||
}
|
||||
|
||||
if (phoneInput.length < 11) {
|
||||
|
||||
$('.alert-msg').removeClass('d-none');
|
||||
$('.alert-msg').addClass('d-block');
|
||||
$('.alert-msg p').text('شماره موبایل معتبر وارد کنید');
|
||||
|
||||
$('#phoneNumber').addClass("invalidPass");
|
||||
} else {
|
||||
|
||||
$('#phoneNumber').removeClass("invalidPass");
|
||||
$('.loading').show();
|
||||
loginWithCode(phoneInput);
|
||||
}
|
||||
});
|
||||
function loginWithCode(phoneInput) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Index", "CheckPhoneValid")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: {
|
||||
'phone': phoneInput
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.exist === false) {
|
||||
$(".phoneAlarm").remove();
|
||||
// $(".error-box-recover").append('<p class="phoneAlarm" style="padding: 10px 7px 0px;"> هیچ کاربری با شماره موبایل وارد شده در سیستم وجود ندارد </p>');
|
||||
|
||||
$('.alert-msg').removeClass('d-none');
|
||||
$('.alert-msg').addClass('d-block');
|
||||
$('.alert-msg p').text('هیچ کاربری با شماره موبایل وارد شده در سیستم وجود ندارد');
|
||||
|
||||
$('.loading').hide();
|
||||
$('#phoneNumber').addClass("invalidPass");
|
||||
} else {
|
||||
|
||||
$('#phoneNumber').removeClass("invalidPass");
|
||||
$('#phoneNumber').hide();
|
||||
$('#btn-login-code').show();
|
||||
|
||||
// sendVervifyCode(phoneInput);
|
||||
|
||||
|
||||
$('.alert-msg').removeClass('d-block');
|
||||
$('.alert-msg').addClass('d-none');
|
||||
$('.alert-msg p').text('');
|
||||
|
||||
$('.removeCodeInput').remove();
|
||||
// $('#appendCodeInput').append(codeInput);
|
||||
|
||||
$('#btnSmsReciver').hide();
|
||||
$('#codeDiv').show();
|
||||
codeTimer();
|
||||
$('.loading').hide();
|
||||
$('#n0').focus();
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
function codeTimer() {
|
||||
var timer2 = "2:00";
|
||||
var interval = setInterval(function () {
|
||||
var timer = timer2.split(':');
|
||||
//by parsing integer, I avoid all extra string processing
|
||||
var minutes = parseInt(timer[0], 10);
|
||||
var seconds = parseInt(timer[1], 10);
|
||||
--seconds;
|
||||
minutes = (seconds < 0) ? --minutes : minutes;
|
||||
if (minutes < 0) clearInterval(interval);
|
||||
seconds = (seconds < 0) ? 59 : seconds;
|
||||
seconds = (seconds < 10) ? '0' + seconds : seconds;
|
||||
//minutes = (minutes < 10) ? minutes : minutes;
|
||||
$('.countdown').html(minutes + ':' + seconds);
|
||||
timer2 = minutes + ':' + seconds;
|
||||
|
||||
// ||
|
||||
if (timer2 === "0:00") {
|
||||
// $('.removeCodeInput').remove();
|
||||
|
||||
//قسمت وارد کردن کد مخفی میشود
|
||||
$('#codeDiv').hide();
|
||||
|
||||
//دکمه ورود مخفی میشود
|
||||
$('#btn-login-code').hide();
|
||||
|
||||
//اینپوت برای وارد کردن کدها خالی میشود
|
||||
$('.codeInput').val('');
|
||||
|
||||
//اینپوت برای وارد کردن شماره تماس باز میشود
|
||||
$('#phoneNumber').show();
|
||||
|
||||
//دکمه برای دریافت کد باز میشود
|
||||
$('#btnSmsReciver').show();
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
function sendVervifyCode(phoneInput) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Index", "SendSms")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: {
|
||||
'phone': phoneInput
|
||||
},
|
||||
success: function (response) {
|
||||
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// function confirmCode() {
|
||||
// var code = $('#code').val();
|
||||
// // let no0 = $('#no0').val();
|
||||
// // let no1 = $('#no1').val();
|
||||
// // let no2 = $('#no2').val();
|
||||
// // let no3 = $('#no3').val();
|
||||
// // let no4 = $('#no4').val();
|
||||
// // let no5 = $('#no5').val();
|
||||
// //var code = no0 + no1 + no2 + no3 + no4 + no5;
|
||||
|
||||
// $.ajax({
|
||||
// dataType: 'json',
|
||||
// type: 'POST',
|
||||
// url: '@Url.Page("./Index", "Verify")',
|
||||
// headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
// data: {
|
||||
// 'code': code
|
||||
// },
|
||||
// success: function (response) {
|
||||
|
||||
// if (response.exist === true) {
|
||||
// $(".phoneAlarm").remove();
|
||||
// console.log("true");
|
||||
|
||||
|
||||
|
||||
// } else {
|
||||
// $('#Verfyusername').val("");
|
||||
// $('#VerfyId').val("");
|
||||
// $(".phoneAlarm").remove();
|
||||
// $(".error-box-VerifyCode").append('<p class="phoneAlarm" style="padding: 10px 7px 0px;"> کد وارد شده صحیح نیست </p>');
|
||||
// }
|
||||
|
||||
|
||||
// },
|
||||
// failure: function (response) {
|
||||
// console.log(5, response);
|
||||
// }
|
||||
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
//login after confirm code
|
||||
function confirmCodeToLogin() {
|
||||
let no0 = $('#n0').val();
|
||||
let no1 = $('#n1').val();
|
||||
let no2 = $('#n2').val();
|
||||
let no3 = $('#n3').val();
|
||||
let no4 = $('#n4').val();
|
||||
let no5 = $('#n5').val();
|
||||
var code = no0 + no1 + no2 + no3 + no4 + no5;
|
||||
|
||||
if (code.length == 6) {
|
||||
$('.loading').show();
|
||||
setTimeout(function () {
|
||||
$.ajax({
|
||||
async : false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Index", "WithMobile")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: {
|
||||
'code': code,
|
||||
'phone': $('#phoneNumber').val()
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.exist === true) {
|
||||
window.location.href = response.url;
|
||||
} else {
|
||||
$('.loading').hide();
|
||||
$('.alert-msg').removeClass('d-none');
|
||||
$('.alert-msg').addClass('d-block');
|
||||
$('.alert-msg p').text('کد وارد شده صحیح نیست');
|
||||
|
||||
// $('#Verfyusername').val("");
|
||||
// $('#VerfyId').val("");
|
||||
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
//******************** عملیات ورود با موبایل و دریافت کد ********************
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
|
||||
390
ServiceHost/Pages/login/Index.cshtml.cs
Normal file
390
ServiceHost/Pages/login/Index.cshtml.cs
Normal file
@@ -0,0 +1,390 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Sms;
|
||||
using AccountManagement.Application.Contracts.Account;
|
||||
using AccountManagement.Domain.AccountAgg;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
using System.Security.Claims;
|
||||
using AccountManagement.Application.Contracts.CameraAccount;
|
||||
using AccountMangement.Infrastructure.EFCore.Repository;
|
||||
using Company.Domain.RollCallAgg.DomainService;
|
||||
using Microsoft.AspNetCore.Antiforgery;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace ServiceHost.Pages.login
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IAccountApplication _accountApplication;
|
||||
private readonly IGoogleRecaptcha _googleRecaptcha;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
||||
private readonly CompanyContext _context;
|
||||
private readonly IRollCallDomainService _rollCallDomainService;
|
||||
|
||||
public string Mess { get; set; }
|
||||
[BindProperty]
|
||||
public string Username { get; set; }
|
||||
[BindProperty]
|
||||
public string Password { get; set; }
|
||||
[BindProperty]
|
||||
public string CaptchaResponse { get; set; }
|
||||
public bool HasApkToDownload { get; set; }
|
||||
private static Timer aTimer;
|
||||
public Login login;
|
||||
public AccountViewModel Search;
|
||||
|
||||
public IndexModel(IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha, IAuthHelper authHelper, IAndroidApkVersionApplication androidApkVersionApplication, CompanyContext context, IRollCallDomainService rollCallDomainService)
|
||||
{
|
||||
_accountApplication = accountApplication;
|
||||
_googleRecaptcha = googleRecaptcha;
|
||||
_authHelper = authHelper;
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
_context = context;
|
||||
_rollCallDomainService = rollCallDomainService;
|
||||
}
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
//var customizeWorkshopSettings = _context.CustomizeWorkshopSettings.AsSplitQuery();
|
||||
|
||||
|
||||
//var rollCalls =
|
||||
// _context.RollCalls.Where(x => customizeWorkshopSettings.Any(a => a.WorkshopId == x.WorkshopId))
|
||||
// .ToList();
|
||||
|
||||
//foreach (var rollCall in rollCalls)
|
||||
//{
|
||||
// rollCall.SetShiftDate(_rollCallDomainService);
|
||||
//}
|
||||
|
||||
//_context.SaveChanges();
|
||||
|
||||
HasApkToDownload = _androidApkVersionApplication.HasAndroidApkToDownload();
|
||||
if (User.Identity is { IsAuthenticated: true })
|
||||
{
|
||||
if (User.FindFirstValue("IsCamera") == "true")
|
||||
{
|
||||
return Redirect("/Camera");
|
||||
}
|
||||
else if ((User.FindFirstValue("ClientAriaPermission") == "true") && (User.FindFirstValue("AdminAreaPermission") == "false"))
|
||||
{
|
||||
return Redirect("/Client");
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("/Admin");
|
||||
}
|
||||
}
|
||||
_authHelper.SignOut();
|
||||
return Page();
|
||||
}
|
||||
|
||||
#region Vafa
|
||||
|
||||
//public IActionResult OnGetGenerateAntiForgeryToken()
|
||||
//{
|
||||
// var tokens = _antiforgery.GetAndStoreTokens(HttpContext);
|
||||
// return new JsonResult(new { token = tokens.RequestToken });
|
||||
//}
|
||||
|
||||
//public IActionResult OnPostLoginAjax(Login command)
|
||||
//{
|
||||
// var result = _accountApplication.Login(command);
|
||||
// if (result.IsSuccedded)
|
||||
// {
|
||||
// string redirectUrl = string.Empty;
|
||||
|
||||
// switch (result.SendId)
|
||||
// {
|
||||
// case 1:
|
||||
// redirectUrl = "/Admin";
|
||||
// break;
|
||||
// case 2:
|
||||
// redirectUrl = "/Client";
|
||||
// break;
|
||||
// case 3:
|
||||
// redirectUrl = "/Camera";
|
||||
// break;
|
||||
// case 0:
|
||||
// result.Message = "امکان ورود با این حساب کاربری وجود ندارد";
|
||||
// return new JsonResult(new { success = false, message = result.Message });
|
||||
// }
|
||||
|
||||
// return new JsonResult(new { success = true, redirectUrl });
|
||||
// }
|
||||
|
||||
// Mess = result.Message;
|
||||
// return new JsonResult(new { success = false, message = result.Message });
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public IActionResult OnPostLogin(Login command)
|
||||
{
|
||||
|
||||
var result = _accountApplication.Login(command);
|
||||
if (result.IsSuccedded)
|
||||
return RedirectToPage("/Admin");
|
||||
|
||||
|
||||
ModelState.AddModelError("Username", "اطلاعات وارد شده اشتباه است");
|
||||
TempData["h"] = "n";
|
||||
Mess = result.Message;
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostEnter(Login command)
|
||||
{
|
||||
|
||||
//bool captchaResult = true;
|
||||
//if (!_webHostEnvironment.IsDevelopment())
|
||||
// captchaResult = _googleRecaptcha.IsSatisfy(CaptchaResponse).Result;
|
||||
|
||||
|
||||
//if (captchaResult)
|
||||
//{
|
||||
var result = _accountApplication.Login(command);
|
||||
if (result.IsSuccedded)
|
||||
{
|
||||
switch (result.SendId)
|
||||
{
|
||||
case 1:
|
||||
return Redirect("/Admin");
|
||||
break;
|
||||
case 2:
|
||||
|
||||
return Redirect("/Client");
|
||||
break;
|
||||
case 3:
|
||||
return Redirect("/Camera");
|
||||
break;
|
||||
case 0:
|
||||
result.Message = "امکان ورود با این حساب کاربری وجود ندارد";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Mess = result.Message;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Mess = "دستگاه شما ربات تشخیص داده شد";
|
||||
//}
|
||||
|
||||
|
||||
|
||||
//ModelState.AddModelError("Username", "اطلاعات وارد شده اشتباه است");
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public async Task<JsonResult> OnPostCheckCaptcha(string response)
|
||||
{
|
||||
var result = await _googleRecaptcha.IsSatisfy(response);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isNotRobot = result,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRegisterClient(string name, string user, string pass, string phone, string nationalcode)
|
||||
{
|
||||
var command = new RegisterAccount()
|
||||
{
|
||||
Fullname = name,
|
||||
Username = user,
|
||||
Password = pass,
|
||||
Mobile = phone,
|
||||
NationalCode = nationalcode,
|
||||
};
|
||||
var result = _accountApplication.RegisterClient(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSucceded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetLogout()
|
||||
{
|
||||
_accountApplication.Logout();
|
||||
return RedirectToPage("/Index");
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> OnPostCheckPhoneValid(string phone)
|
||||
{
|
||||
|
||||
|
||||
var result = _accountApplication.Search(new AccountSearchModel() { Mobile = phone }).FirstOrDefault();
|
||||
if (result == null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
SendSms(phone);
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void SendSms(string phone)
|
||||
{
|
||||
var result = _accountApplication.Search(new AccountSearchModel() { Mobile = phone }).FirstOrDefault();
|
||||
if (result != null)
|
||||
{
|
||||
_accountApplication.SetVerifyCode(phone, result.Id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostWithMobile(string code, string phone)
|
||||
{
|
||||
//bool captchaResult = true;
|
||||
//if (!_webHostEnvironment.IsDevelopment())
|
||||
// captchaResult = _googleRecaptcha.IsSatisfy(CaptchaResponse).Result;
|
||||
//if (captchaResult)
|
||||
//{
|
||||
var verfiyResult = _accountApplication.GetByVerifyCode(code, phone);
|
||||
if (verfiyResult != null)
|
||||
{
|
||||
|
||||
var result = _accountApplication.LoginWithMobile(verfiyResult.Id);
|
||||
if (result.IsSuccedded && result.SendId == 1)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
url = "/Admin",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (result.IsSuccedded && result.SendId == 2)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
url = "/Client",
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Mess = "دستگاه شما ربات تشخیص داده شد";
|
||||
//}
|
||||
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
|
||||
}
|
||||
public IActionResult OnPostVerify(string code, string phone)
|
||||
{
|
||||
var result = _accountApplication.GetByVerifyCode(code, phone);
|
||||
if (result != null)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
user = result.Username,
|
||||
verfyId = result.Id
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnPostChangePass(long id, string username, string newpass)
|
||||
{
|
||||
var result = _accountApplication.GetByUserNameAndId(id, username);
|
||||
if (result != null)
|
||||
{
|
||||
var command = new ChangePassword()
|
||||
{
|
||||
Id = id,
|
||||
Password = newpass,
|
||||
RePassword = newpass
|
||||
};
|
||||
var finalResult = _accountApplication.ChangePassword(command);
|
||||
if (finalResult.IsSuccedded)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
changed = true
|
||||
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = true,
|
||||
changed = false
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
exist = false,
|
||||
changed = false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RecaptchaResponse
|
||||
{
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
|
||||
[JsonProperty("challenge_ts")]
|
||||
public DateTimeOffset ChallengeTs { get; set; }
|
||||
|
||||
[JsonProperty("hostname")]
|
||||
public string HostName { get; set; }
|
||||
}
|
||||
493
ServiceHost/Pages/rule/Index.cshtml
Normal file
493
ServiceHost/Pages/rule/Index.cshtml
Normal file
File diff suppressed because one or more lines are too long
12
ServiceHost/Pages/rule/Index.cshtml.cs
Normal file
12
ServiceHost/Pages/rule/Index.cshtml.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Pages.rule
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
103
ServiceHost/Pages/services/account-management.cshtml
Normal file
103
ServiceHost/Pages/services/account-management.cshtml
Normal file
@@ -0,0 +1,103 @@
|
||||
@page
|
||||
@model ServiceHost.Pages.services.account_managementModel
|
||||
@{
|
||||
Layout = "Shared/_LayoutHome";
|
||||
}
|
||||
|
||||
<!-- Start Header -->
|
||||
<div class="py-3 relative overflow-hidden">
|
||||
<img src="~/assetsmain/images/headerSingle.png" class="absolute inset-0 object-cover object-center dark:opacity-15 h-full w-full" alt="" srcset="">
|
||||
<div class="flex items-center justify-between gap-3 py-1 z-10">
|
||||
<div class="flex flex-col gap-2 lg:gap-4 px-6 w-full md:w-6/12 text-[#3F3F3F] dark:text-white opacity-100 z-10">
|
||||
<h4 class="text-[1.6rem] font-bold">مدیریت کاربران</h4>
|
||||
<p class="text-[0.8rem] md:text-[0.9rem] font-bold md:font-medium text-justify">
|
||||
بخش "مدیریت کاربران" به کارفرما یا مدیر اصلی سیستم این امکان را میدهد که برای افراد مختلف (مثل مدیران، نمایندهها یا اعضای تیم منابع انسانی) حساب کاربری مجزا ایجاد کند و سطح دسترسی هر کدام را بهصورت دقیق تنظیم نماید.
|
||||
</p>
|
||||
<div class="flex items-center justify-start gap-3 my-4">
|
||||
<button class="py-[0.54rem] w-full md:w-[8rem] px-3 text-[0.8rem] font-[500] text-center bg-white hover:bg-[#2DBCBC] border-2 border-[#2DBCBC] text-[#138F8F] hover:text-white rounded-md duration-500 ease-in-out">
|
||||
<span>تماس با فروش</span>
|
||||
</button>
|
||||
<a asp-page="/register/Index" class="py-[0.54rem] w-full md:w-[8rem] px-3 text-[0.8rem] font-[500] text-center bg-white hover:bg-[#2DBCBC] border-2 border-[#2DBCBC] text-[#138F8F] hover:text-white rounded-md duration-500 ease-in-out cursor-pointer">
|
||||
<span>ثبت نام</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden md:flex justify-end gap-6 w-6/12 opacity-100 z-1">
|
||||
<img src="~/assetsmain/images/line-wave.svg" class="absolute left-0 -top-20 " alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Header -->
|
||||
<!-- Start Contents -->
|
||||
|
||||
<div class="px-6 md:px-9 lg:px-12 mx-auto max-w-[1320px]">
|
||||
<div class="mb-9 max-w-screen-xl">
|
||||
<div class="w-full mx-auto">
|
||||
<div class="text-[#178B8B] dark:text-white text-[0.85rem] font-medium text-center">امکانات کلیدی این بخش</div>
|
||||
|
||||
<div class="my-6">
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 text-start items-start p-3 md:p-4 lg:p-6 gap-3 my-6">
|
||||
|
||||
<div class="">
|
||||
<img src="~/assetsmain/images/newEmployee.svg" class="w-30 text-center" alt="">
|
||||
<div class="text-[#3F3F3F] dark:text-white text-[0.9rem] font-bold text-start my-3 relative before:content-[''] before:absolute before:h-full before:w-1 before:-right-3 before:top-0 before:bg-[#27ACAC]">ایجاد حساب کاربری جدید</div>
|
||||
<p class="text-[#818181] dark:text-white text-[0.8rem] font-medium">
|
||||
کارفرما میتواند با چند کلیک، برای یک فرد جدید یک حساب کاربری تعریف کند.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<img src="~/assetsmain/images/permission.svg" class="w-30 text-center" alt="">
|
||||
<div class="text-[#3F3F3F] dark:text-white text-[0.9rem] font-bold text-start my-3 relative before:content-[''] before:absolute before:h-full before:w-1 before:-right-3 before:top-0 before:bg-[#27ACAC]">تعیین نقش و سطح دسترسی</div>
|
||||
<p class="text-[#818181] dark:text-white text-[0.8rem] font-medium">
|
||||
با استفاده از قابلیت «افزودن نقش جدید»، میتوان برای هر کاربر مشخص کرد که به چه بخشهایی از نرمافزار دسترسی داشته باشد.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<img src="~/assetsmain/images/mngEmplyees.svg" class="w-30 text-center" alt="">
|
||||
<div class="text-[#3F3F3F] dark:text-white text-[0.9rem] font-bold text-start my-3 relative before:content-[''] before:absolute before:h-full before:w-1 before:-right-3 before:top-0 before:bg-[#27ACAC]">مدیریت وضعیت کاربران</div>
|
||||
<p class="text-[#818181] dark:text-white text-[0.8rem] font-medium">
|
||||
میتوان حساب کاربران را هر زمان فعال یا غیرفعال کرد؛ بدون اینکه اطلاعاتشان حذف شود. این گزینه برای مواقعی که همکاری با یک شخص موقتاً متوقف میشود یا تغییر مسئولیت دارد، بسیار کاربردی است.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<img src="~/assetsmain/images/pointer.svg" class="w-30 text-center" alt="">
|
||||
<div class="text-[#3F3F3F] dark:text-white text-[0.9rem] font-bold text-start my-3 relative before:content-[''] before:absolute before:h-full before:w-1 before:-right-3 before:top-0 before:bg-[#27ACAC]">ویرایش یا حذف کاربران</div>
|
||||
<p class="text-[#818181] dark:text-white text-[0.8rem] font-medium">
|
||||
امکان ویرایش اطلاعات کاربران یا حذف کامل آنها از سیستم با یک کلیک در دسترس است.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="py-3 px-6 mx-auto max-w-[1320px]">
|
||||
<div class="relative flex flex-col md:flex-row gap-6 items-center w-full mx-auto bg-gradient-to-l to-[#2EBEBE] 1E9D9D from-[#035757] overflow-hidden rounded-2xl my-1 p-3 md:p-6 lg:p-9">
|
||||
|
||||
<div class="absolute bottom-0 left-0">
|
||||
<img src="~/assetsmain/images/lineSupportLeft.svg" class="" alt="">
|
||||
</div>
|
||||
<div class="absolute top-0 -right-6">
|
||||
<img src="~/assetsmain/images/lineSupportRight.svg" class="" alt="">
|
||||
</div>
|
||||
|
||||
<div class="w-full md:w-8/12 text-center md:text-start">
|
||||
<div class="text-white font-extrabold text-[1.6rem] mb-4">مدیریت یکپارچه منابع انسانی و هوشمند</div>
|
||||
<p class="text-white font-medium text-[0.8rem] p-0 text-justify">
|
||||
با استفاده از خدمات سامانه کارگاه، به اطلاعات پرسنلی، صورتحسابهای مالی، گزارشات، حضور و غیاب، کارپوشه، مدیریت کاربران و پشتیبانی دسترسی داشته باشید و فرآیندهای سازمانی خود را بهینه کنید.
|
||||
</p>
|
||||
</div>
|
||||
<div class="w-full md:w-4/12 text-center md:text-left z-10">
|
||||
<a asp-page="/contact-us/Index" class="px-9 py-2 w-full md:w-auto text-[#138F8F] text-[0.8rem] font-semibold rounded-lg cursor-pointer bg-white hover:bg-[#DDDDDD] duration-500 ease-in-out">درخواست مشاوره</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user