add register part
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
@@ -0,0 +1,8 @@
|
|||||||
|
using _0_Framework.Domain;
|
||||||
|
|
||||||
|
namespace Company.Domain.ContactUsAgg;
|
||||||
|
|
||||||
|
public interface IContactUsRepository : IRepository<long, ContactUs>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -14,5 +14,7 @@ public interface IWorkshopTempRepository : IRepository<long, WorkshopTemp>
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<List<WorkshopTempViewModel>> GetWorkshopTemp(long contractingPartyTemp);
|
Task<List<WorkshopTempViewModel>> GetWorkshopTemp(long contractingPartyTemp);
|
||||||
|
|
||||||
|
System.Threading.Tasks.Task RemoveWorkshopTemps(List<long> workshopTempIds);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -34,12 +34,14 @@ public class InstitutionContractTemp : EntityBase
|
|||||||
/// بصورت یکجا
|
/// بصورت یکجا
|
||||||
/// -
|
/// -
|
||||||
/// بصئورت ماهیانه
|
/// بصئورت ماهیانه
|
||||||
|
/// OneTime
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PaymentModel { get; private set; }
|
public string PaymentModel { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// مدت قرارداد
|
/// مدت قرارداد
|
||||||
/// چند ماهه؟
|
/// چند ماهه؟
|
||||||
|
/// "12"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PeriodModel { get; private set; }
|
public string PeriodModel { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -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; }
|
||||||
|
}
|
||||||
@@ -38,7 +38,7 @@ public interface ITemporaryClientRegistrationApplication
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
/// <param name="command"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
Task<OperationResult> CreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command);
|
Task<OperationResult> CreateOrUpdateWorkshopTemp(List<WorkshopTempViewModel> command, long contractingPartyTempId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// دریافت جمع کل خدمات برای یک کارگاه
|
/// دریافت جمع کل خدمات برای یک کارگاه
|
||||||
|
|||||||
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@ using Company.Domain.CheckoutAgg;
|
|||||||
using Company.Domain.ClassifiedSalaryAgg;
|
using Company.Domain.ClassifiedSalaryAgg;
|
||||||
using Company.Domain.ClientEmployeeWorkshopAgg;
|
using Company.Domain.ClientEmployeeWorkshopAgg;
|
||||||
using Company.Domain.Contact2Agg;
|
using Company.Domain.Contact2Agg;
|
||||||
|
using Company.Domain.ContactUsAgg;
|
||||||
using Company.Domain.ContarctingPartyAgg;
|
using Company.Domain.ContarctingPartyAgg;
|
||||||
using Company.Domain.ContractAgg;
|
using Company.Domain.ContractAgg;
|
||||||
using Company.Domain.ContractingPartyAccountAgg;
|
using Company.Domain.ContractingPartyAccountAgg;
|
||||||
@@ -173,6 +174,8 @@ public class CompanyContext : DbContext
|
|||||||
|
|
||||||
public DbSet<EmployeeClientTemp> EmployeeClientTemps { get; set; }
|
public DbSet<EmployeeClientTemp> EmployeeClientTemps { get; set; }
|
||||||
public DbSet<LeftWorkTemp> LeftWorkTemps { get; set; }
|
public DbSet<LeftWorkTemp> LeftWorkTemps { get; set; }
|
||||||
|
public DbSet<ContactUs> ContactUs { get; set; }
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
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.IdNumberSerial).HasMaxLength(15);
|
||||||
builder.Property(x => x.FatherName).HasMaxLength(20);
|
builder.Property(x => x.FatherName).HasMaxLength(20);
|
||||||
builder.Property(x => x.DateOfBirth).IsRequired(false);
|
builder.Property(x => x.DateOfBirth).IsRequired(false);
|
||||||
builder.Property(x => x.Gender).HasConversion(
|
builder.Property(x => x.Gender).HasConversion(
|
||||||
v => v.ToString(),
|
v => v.ToString(),
|
||||||
v => string.IsNullOrWhiteSpace(v) ? Gender.None : (Gender)Enum.Parse(typeof(Gender), v)).HasMaxLength(6);
|
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
@@ -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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -529,6 +529,50 @@ namespace CompanyManagment.EFCore.Migrations
|
|||||||
b.ToTable("TextManager_Contact", (string)null);
|
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 =>
|
modelBuilder.Entity("Company.Domain.ContarctingPartyAgg.PersonalContractingParty", b =>
|
||||||
{
|
{
|
||||||
b.Property<long>("id")
|
b.Property<long>("id")
|
||||||
|
|||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Numerics;
|
|
||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
using _0_Framework.InfraStructure;
|
using _0_Framework.InfraStructure;
|
||||||
using Company.Domain.InstitutionPlanAgg;
|
using Company.Domain.InstitutionPlanAgg;
|
||||||
@@ -170,7 +169,6 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public InstitutionPlanViewModel GetInstitutionPlanForWorkshop(WorkshopTempViewModel command)
|
public InstitutionPlanViewModel GetInstitutionPlanForWorkshop(WorkshopTempViewModel command)
|
||||||
{
|
{
|
||||||
var planPercentage = _context.PlanPercentages.FirstOrDefault();
|
var planPercentage = _context.PlanPercentages.FirstOrDefault();
|
||||||
@@ -184,7 +182,10 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
|||||||
|
|
||||||
var dailyWage = dailyWageYearlySalery.YearlySalaryItemsList.Where(x => x.ItemName == "مزد روزانه")
|
var dailyWage = dailyWageYearlySalery.YearlySalaryItemsList.Where(x => x.ItemName == "مزد روزانه")
|
||||||
.Select(x => x.ItemValue).FirstOrDefault();
|
.Select(x => x.ItemValue).FirstOrDefault();
|
||||||
|
if (command.ContractAndCheckout)
|
||||||
|
command.ContractAndCheckoutInPerson = true;
|
||||||
|
if(command.Insurance)
|
||||||
|
command.InsuranceInPerson = true;
|
||||||
|
|
||||||
if (command.CountPerson > 0)
|
if (command.CountPerson > 0)
|
||||||
{
|
{
|
||||||
@@ -193,28 +194,28 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
|||||||
.Select(plan => new InstitutionPlanViewModel
|
.Select(plan => new InstitutionPlanViewModel
|
||||||
{
|
{
|
||||||
CountPerson = plan.CountPerson,
|
CountPerson = plan.CountPerson,
|
||||||
|
|
||||||
ContractAndCheckoutDouble = command.ContractAndCheckout ?
|
ContractAndCheckoutDouble = command.ContractAndCheckout ?
|
||||||
((dailyWage * planPercentage.ContractAndCheckoutPercent / 100) * plan.CountPerson * plan.IncreasePercentage) : 0,
|
((dailyWage * planPercentage.ContractAndCheckoutPercent / 100) * plan.CountPerson * plan.IncreasePercentage) : 0,
|
||||||
|
|
||||||
InsuranceDouble = command.Insurance ? (((dailyWage * planPercentage.InsurancePercent) / 100) * plan.CountPerson *
|
InsuranceDouble = command.Insurance ? (((dailyWage * planPercentage.InsurancePercent) / 100) * plan.CountPerson *
|
||||||
plan.IncreasePercentage) : 0,
|
plan.IncreasePercentage) : 0,
|
||||||
|
|
||||||
RollCallDouble = command.RollCall ? (((dailyWage * planPercentage.RollCallPercent) / 100) * plan.CountPerson *
|
RollCallDouble = command.RollCall ? (((dailyWage * planPercentage.RollCallPercent) / 100) * plan.CountPerson *
|
||||||
plan.IncreasePercentage) : 0,
|
plan.IncreasePercentage) : 0,
|
||||||
|
|
||||||
CustomizeCheckoutDouble = (((dailyWage * planPercentage.CustomizeCheckoutPercent) / 100) * plan.CountPerson *
|
CustomizeCheckoutDouble =command.CustomizeCheckout ? (((dailyWage * planPercentage.CustomizeCheckoutPercent) / 100) * plan.CountPerson *
|
||||||
plan.IncreasePercentage),
|
plan.IncreasePercentage) : 0,
|
||||||
|
|
||||||
ContractAndCheckoutInPersonDouble = command.ContractAndCheckoutInPerson ? (((dailyWage * planPercentage.ContractAndCheckoutInPersonPercent) / 100) * plan.CountPerson *
|
ContractAndCheckoutInPersonDouble = command.ContractAndCheckoutInPerson ? (((dailyWage * planPercentage.ContractAndCheckoutInPersonPercent) / 100) * plan.CountPerson *
|
||||||
plan.IncreasePercentage) : 0,
|
plan.IncreasePercentage) : 0,
|
||||||
|
|
||||||
InsuranceInPersonDouble = command.InsuranceInPerson ? (((dailyWage * planPercentage.InsuranceInPersonPercent) / 100) * plan.CountPerson *
|
InsuranceInPersonDouble = command.InsuranceInPerson ? (((dailyWage * planPercentage.InsuranceInPersonPercent) / 100) * plan.CountPerson *
|
||||||
plan.IncreasePercentage) : 0,
|
plan.IncreasePercentage) : 0,
|
||||||
|
|
||||||
}).FirstOrDefault();
|
}).FirstOrDefault();
|
||||||
|
|
||||||
if(planByCountPerson == null)
|
if (planByCountPerson == null)
|
||||||
return new InstitutionPlanViewModel();
|
return new InstitutionPlanViewModel();
|
||||||
//مبلغ کل خدمات حضوری
|
//مبلغ کل خدمات حضوری
|
||||||
var inPersonSumAmount = planByCountPerson.ContractAndCheckoutDouble + planByCountPerson.InsuranceDouble +
|
var inPersonSumAmount = planByCountPerson.ContractAndCheckoutDouble + planByCountPerson.InsuranceDouble +
|
||||||
@@ -236,7 +237,7 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
|||||||
{
|
{
|
||||||
CountPerson = planByCountPerson.CountPerson,
|
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",
|
Insurance = planByCountPerson.InsuranceDouble > 0 ? planByCountPerson.InsuranceDouble.ToMoney() : "0",
|
||||||
|
|
||||||
@@ -259,7 +260,7 @@ public class PlanPercentageRepository : RepositoryBase<long, PlanPercentage>, IP
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return new InstitutionPlanViewModel();
|
return new InstitutionPlanViewModel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,5 +40,11 @@ public class WorkshopTempRepository : RepositoryBase<long, WorkshopTemp>, IWorks
|
|||||||
return result;
|
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.InstitutionPlan;
|
||||||
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
using CompanyManagment.App.Contracts.LeftWorkTemp;
|
||||||
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||||
|
using Company.Domain.ContactUsAgg;
|
||||||
|
using CompanyManagment.App.Contracts.ContactUs;
|
||||||
|
|
||||||
namespace PersonalContractingParty.Config;
|
namespace PersonalContractingParty.Config;
|
||||||
|
|
||||||
@@ -423,6 +425,9 @@ public class PersonalBootstrapper
|
|||||||
|
|
||||||
services.AddTransient<ILeftWorkTempRepository, LeftWorkTempRepository>();
|
services.AddTransient<ILeftWorkTempRepository, LeftWorkTempRepository>();
|
||||||
services.AddTransient<ILeftWorkTempApplication, LeftWorkTempApplication>();
|
services.AddTransient<ILeftWorkTempApplication, LeftWorkTempApplication>();
|
||||||
|
|
||||||
|
services.AddTransient<IContactUsRepository, ContactUsRepository>();
|
||||||
|
services.AddTransient<IContactUsApplication, ContactUsApplication>();
|
||||||
#endregion
|
#endregion
|
||||||
#region Pooya
|
#region Pooya
|
||||||
|
|
||||||
|
|||||||
@@ -1,601 +0,0 @@
|
|||||||
@using _0_Framework.Application
|
|
||||||
@model CompanyManagment.App.Contracts.Checkout.CreateCheckout
|
|
||||||
@{
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.sendSelectDate {
|
|
||||||
border-color: #ff4e4e !important;
|
|
||||||
background-color: #ffe4e4 !important;
|
|
||||||
}
|
|
||||||
.modal-dialog {
|
|
||||||
width: 40% !important;
|
|
||||||
}
|
|
||||||
.modal-header{
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
.panel-default > .panel-heading {
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
.modal .modal-dialog .modal-content {
|
|
||||||
height: auto !important;
|
|
||||||
min-height: auto !important;
|
|
||||||
}
|
|
||||||
@@media (min-width: 1500px) {
|
|
||||||
.modal-dialog {
|
|
||||||
width: 35% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@media (max-width: 1200px) {
|
|
||||||
.modal-dialog {
|
|
||||||
width: 60% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@media (max-width: 768px) {
|
|
||||||
.modal-dialog {
|
|
||||||
width: 90% !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@media (max-width: 500px) {
|
|
||||||
#thh th, td {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode th{
|
|
||||||
font-size: 13px !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.select2-container {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-footer {
|
|
||||||
border-top: unset !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal .modal-dialog .modal-content .modal-footer {
|
|
||||||
padding-top: unset !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* p {
|
|
||||||
direction: ltr !important;
|
|
||||||
text-align: right !important;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
input[type=radio]:hover {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
|
||||||
background: #dfdfdf;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
|
||||||
background: brown;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
/* .se .select2-container {
|
|
||||||
width: 75% !important;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/* .se .select2-container--default .select2-selection--single {
|
|
||||||
border-radius: 0px 22px 22px 0px !important;
|
|
||||||
border: 1px solid #a5a3a3 !important;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
hr {
|
|
||||||
margin-top: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
border-top: 1px solid #d3d3d3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.checkbox + .checkbox, .radio + .radio {
|
|
||||||
margin-top: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.radio {
|
|
||||||
margin-top: 0px !important;
|
|
||||||
}
|
|
||||||
/* .radio {
|
|
||||||
margin: 5px 20px 5px 20px !important;
|
|
||||||
}*/
|
|
||||||
/* .form-control {
|
|
||||||
width: 75% !important;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/*----------------------------*/
|
|
||||||
#EmployerFullName table {
|
|
||||||
width: 100%;
|
|
||||||
height: 150px;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EmployerFullName th, td {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EmployerFullName td:nth-child(odd) {
|
|
||||||
border-bottom: 1px solid #fff;
|
|
||||||
background-color: #bed3ca;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#EmployerFullName tr:hover {
|
|
||||||
background-color: rgb(108, 186, 250);
|
|
||||||
}
|
|
||||||
#datatable.changeCode {
|
|
||||||
width: 100%;
|
|
||||||
height: 150px;
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 auto;
|
|
||||||
border-collapse: separate;
|
|
||||||
table-layout: fixed;
|
|
||||||
overflow-y: scroll;
|
|
||||||
max-width: 100%;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode thead tr th:nth-child(1) {
|
|
||||||
border-top-right-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode thead tr th:last-child {
|
|
||||||
border-top-left-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode tbody td.last-row-last-child {
|
|
||||||
border-bottom-left-radius: 10px;
|
|
||||||
}
|
|
||||||
#datatable.changeCode tbody td.last-row-first-child {
|
|
||||||
border-bottom-right-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode th, td {
|
|
||||||
padding: 10px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode td {
|
|
||||||
font-weight: normal;
|
|
||||||
color: black;
|
|
||||||
border: 1px solid #c7c7c7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode th {
|
|
||||||
background-color: #5a5959;
|
|
||||||
color: white;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 15px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode td:nth-child(odd) {
|
|
||||||
border-left: 1px solid #fff;
|
|
||||||
width: 40%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode td:nth-child(even) {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode th {
|
|
||||||
border-left: 1px solid #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode tr:nth-child(even) {
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
.pCode {
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 7px;
|
|
||||||
background-color: #e9e9e9;
|
|
||||||
border: 2px solid #bfbfbf;
|
|
||||||
color: #444444;
|
|
||||||
height: 24px;
|
|
||||||
width: 50% !important;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
#datatable.changeCode tr {
|
|
||||||
background-color: rgb(224, 227, 228);
|
|
||||||
}
|
|
||||||
|
|
||||||
#datatable.changeCode tr:hover {
|
|
||||||
background-color: rgb(152 154 155);
|
|
||||||
}
|
|
||||||
.buttonInside {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
#btnOk {
|
|
||||||
position: absolute;
|
|
||||||
left: 12px;
|
|
||||||
top: 32px;
|
|
||||||
padding: 6px;
|
|
||||||
color: #464646 !important;
|
|
||||||
border-radius: 8px 0px 0px 8px;
|
|
||||||
border-top: 0px;
|
|
||||||
border-bottom: 0px;
|
|
||||||
border-left: 0px;
|
|
||||||
background-color: #ededed;
|
|
||||||
border-color: #c9c4c4;
|
|
||||||
font-size: 11px;
|
|
||||||
font-family: 'IranSans' !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.final {
|
|
||||||
background: #0f9500;
|
|
||||||
border: #0f9500;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
}
|
|
||||||
@{
|
|
||||||
|
|
||||||
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"></script>
|
|
||||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
|
||||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
|
||||||
<script src="~/lib/select2/js/select2.js"></script>
|
|
||||||
<script src="~/lib/select2/js/i18n/fa.js"></script>
|
|
||||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
<link href="~/lib/select2/css/select2.css" rel="stylesheet" />
|
|
||||||
}
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close pull-right" data-dismiss="modal" aria-hidden="true"><span style="font-size: 24px">×</span></button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;">
|
|
||||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 150px; text-align: center;"> ویرایش کد پرسنلی </legend>
|
|
||||||
|
|
||||||
<form id="my_form" asp-page="./Index" asp-page-handler="ChangeCode" autocomplete="off"
|
|
||||||
method="get"
|
|
||||||
data-ajax="true"
|
|
||||||
data-ajax-method="get"
|
|
||||||
data-ajax-update="#panel"
|
|
||||||
data-ajax-mode="replace"
|
|
||||||
data-ajax-url="@Url.Page("./Index","LoadContracts")">
|
|
||||||
|
|
||||||
<div id="progress-bar" class="progress" style="display: none;">
|
|
||||||
<div style="background-color: #28a711" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 right">
|
|
||||||
<div class="col-md-6 col-sm-6 col-lg-6 col-xs-12">
|
|
||||||
<label> نام کارگاه </label>
|
|
||||||
<div class="form-group se" dir="rtl">
|
|
||||||
<div class="form-control"> @Model.WorkshopName</div>
|
|
||||||
<input type="hidden" asp-for="WorkshopId" value="@Model.WorkshopId"/>
|
|
||||||
@*<a class="btn btn-info btn-rounded waves-effect waves-light" style="border-bottom-right-radius: 0px; border-top-right-radius: 0px; background-color: #257212; border-color: #545353; font-size: 14px; margin-right: -3px; font-family: 'IranSans' !important;" onclick="show()">تایید</a>*@
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 col-sm-6 col-lg-6 col-xs-12">
|
|
||||||
<label>نام پرسنل</label>
|
|
||||||
<div id="person">
|
|
||||||
<div class="form-group se person" dir="rtl">
|
|
||||||
<select id="getPersonnel" class="form-control select-city" asp-for="EmployeeId" >
|
|
||||||
<option value="0"> انتخاب پرسنل </option>
|
|
||||||
@foreach (var item in Model.EmployeeList)
|
|
||||||
{
|
|
||||||
<option value="@item.Id"> @item.EmployeeFullName </option>
|
|
||||||
}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<span asp-validation-for="EmployeeId" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row" dir="rtl">
|
|
||||||
<div class="col-md-1 pull-left">
|
|
||||||
@* <a class="btn btn-success btn-rounded waves-effect waves-light" onclick="sendData()" style="float: left;">انتخاب</a>*@
|
|
||||||
<input type="submit" form="my_form" value="Search" name="Search" id="select" style="display: none" />
|
|
||||||
</div>
|
|
||||||
<div class="col-md-11">
|
|
||||||
<span id="montAndYearError"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr style=" margin-top: 12px;margin-bottom: 12px;" />
|
|
||||||
</form>
|
|
||||||
<form asp-page="./Index" asp-page-handler="ChangeCode" autocomplete="off" id="changeCodeForm"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true"
|
|
||||||
data-ajax-method="post"
|
|
||||||
data-ajax-url="@Url.Page("./Index","Check")"
|
|
||||||
data-callback=""
|
|
||||||
data-action="Refresh">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12">
|
|
||||||
<div class="panel panel-default" style="border-radius: 10px;">
|
|
||||||
<div class="panel-heading" style="border-radius: 10px;">
|
|
||||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست شماره پرسنلی </h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-sm-12 col-xs-12">
|
|
||||||
<table id="datatable" class="table table-striped changeCode" style="direction: rtl">
|
|
||||||
<thead style="background-color: #ecefee">
|
|
||||||
<tr>
|
|
||||||
<th style="width: 20px;" class="sizeSet">#</th>
|
|
||||||
<th class="sizeSet decorCheckbox">
|
|
||||||
<input class="checkboxtitle" type="checkbox" id="checkSelect1" disabled="disabled" />
|
|
||||||
</th>
|
|
||||||
<th class="sizeSet">شماره پرسنلی</th>
|
|
||||||
<th class="sizeSet"> پرسنل </th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody id="panel">
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" id="sendWId" name="workshopId" />
|
|
||||||
<div id="listOfContract" style="display: none">
|
|
||||||
</div>
|
|
||||||
@*<input type="hidden" asp-for="id" value="id"/>*@
|
|
||||||
<div class="modal-footer m-b-10">
|
|
||||||
<a href="#" onclick="final()" class="btn btn-success btn-rounded waves-effect waves-light pull-left final">ثبت نهایی</a>
|
|
||||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light pull-left m-b-5" data-dismiss="modal">بستن</button>
|
|
||||||
<input type="submit" id="sendFinaly" form="sub" value="fine" name="fine" style="display: none" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
@Html.AntiForgeryToken()
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
$(".select-city2").select2({
|
|
||||||
language: "fa",
|
|
||||||
dir: "rtl"
|
|
||||||
});
|
|
||||||
$('.final').attr('disabled', 'disabled');
|
|
||||||
$('.final').css("background-color", "gray");
|
|
||||||
$('.byStep').attr('disabled', 'disabled');
|
|
||||||
$('.byStep').css("background-color", "unset");
|
|
||||||
$('.byStepButton').attr('disabled', 'disabled');
|
|
||||||
$('.byStepButton').css("background-color", "gray");
|
|
||||||
sendData();
|
|
||||||
});
|
|
||||||
function sendData() {
|
|
||||||
$('.formStep').remove();
|
|
||||||
$('.ConvertErr').remove();
|
|
||||||
$('#convertError').append(
|
|
||||||
|
|
||||||
'<input type="hidden" class="formStep" value="select" name="FormStep"/>'
|
|
||||||
);
|
|
||||||
$('#select').click();
|
|
||||||
$('.byStep').removeAttr('disabled');
|
|
||||||
$('.byStepButton').removeAttr('disabled');
|
|
||||||
$('.byStep').css({ 'background-color': '' });
|
|
||||||
$('.byStepButton').css({ 'background-color': '' });
|
|
||||||
$('.final').removeAttr('disabled');
|
|
||||||
$('.final').css({ "background-color": '' });
|
|
||||||
|
|
||||||
//} else {
|
|
||||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " انتخاب کارگاه اجباری است ");
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function final() {
|
|
||||||
|
|
||||||
//$('.final').attr('disabled', 'disabled');
|
|
||||||
//$('.final').css("background-color", "gray");
|
|
||||||
//$('.byStep').attr('disabled', 'disabled');
|
|
||||||
//$('.byStep').css("background-color", "unset");
|
|
||||||
//$('.byStepButton').attr('disabled', 'disabled');
|
|
||||||
//$('.byStepButton').css("background-color", "gray");
|
|
||||||
//$('#sub').on('submit', function(e) {
|
|
||||||
// e.preventDefault();
|
|
||||||
//});
|
|
||||||
$('.item1').remove();
|
|
||||||
const wId =@Model.WorkshopId; //document.getElementById("getWorkshopWithName").value;
|
|
||||||
var checkboxId = document.getElementsByName("cheking");
|
|
||||||
var personnelCodeChange = document.getElementsByClassName("pCode");
|
|
||||||
//var listArray = [];
|
|
||||||
//for (var j = 0, p = personnelCodeChange[j].length; j < p; j++) {
|
|
||||||
// console.log(personnelCodeChange[j].name);
|
|
||||||
//}
|
|
||||||
$('#panel tr td').append(
|
|
||||||
'<input class="item1" type="hidden" value="' + wId + '" name="WorkshopId"/>'
|
|
||||||
);
|
|
||||||
for (var i = 0, n = checkboxId.length; i < n; i++) {
|
|
||||||
if (checkboxId[i].checked) {
|
|
||||||
|
|
||||||
let pname = checkboxId[i].value;
|
|
||||||
let inputElement = document.querySelector('input[name="' + pname + '"]');
|
|
||||||
|
|
||||||
$('#panel tr td').append(
|
|
||||||
|
|
||||||
'<input class="item1" type="hidden" value="' + pname + '" name="Contracts[' + i + '].EmployeeId"/>'
|
|
||||||
+ '<input class="item1" type="hidden" value="' + inputElement.value + '" name="Contracts[' + i + '].PersonnelCode"/>'
|
|
||||||
);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$('#panel tr td').append(
|
|
||||||
|
|
||||||
'<input class="item1" type="hidden" value="' + 0 + '" name="Contracts[' + i + '].EmployeeId"/>'
|
|
||||||
+ '<input class="item1" type="hidden" value="' + 0 + '" name="Contracts[' + i + '].PersonnelCode"/>'
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if (checkboxId.length > 0) {
|
|
||||||
|
|
||||||
$('#changeCodeForm').submit();
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "هیچ پرسنلی برای ویرایش انتخاب نشده است");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#changeCodeForm').submit(function (e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: $(this).attr('action'),
|
|
||||||
data: $(this).serialize(),
|
|
||||||
success: function (response) {
|
|
||||||
if (response.isSuccedded == true) {
|
|
||||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
|
||||||
$('#select').click();
|
|
||||||
getEmployeeList();
|
|
||||||
$("#MainModal").modal('hide');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function loadWorkshopWithName() {
|
|
||||||
/* loadPersonnel();*/
|
|
||||||
const nameId = document.getElementById("getWorkshopWithName").value;
|
|
||||||
const nameIndex = document.getElementById("getWorkshopWithName");
|
|
||||||
|
|
||||||
|
|
||||||
var myArray = document.getElementById('getWorkshopWithName').options.selectedIndex;
|
|
||||||
//document.getElementById("getWorkshopWithCode").options.selectedIndex = myArray;
|
|
||||||
//var codeId = document.getElementById("getWorkshopWithCode");
|
|
||||||
//var archiveCodee = codeId.options[codeId.selectedIndex];
|
|
||||||
|
|
||||||
//document.getElementById("select2-getWorkshopWithCode-container").innerHTML = archiveCodee.text;
|
|
||||||
|
|
||||||
|
|
||||||
$('#getPersonnel').empty().append('<option selected="selected" value="0" >انتخاب پرسنل</option>');
|
|
||||||
|
|
||||||
// $('#archiveCode').val(archiveCodee.text);
|
|
||||||
|
|
||||||
|
|
||||||
if (nameId != "WorkshopIds") {
|
|
||||||
$.ajax({
|
|
||||||
//contentType: 'application/json; charset=utf-8',
|
|
||||||
dataType: 'json',
|
|
||||||
type: 'POST',
|
|
||||||
url: '@Url.Page("/Company/Contracts/Index", "LoadWorkshops")',
|
|
||||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
|
||||||
data: { "id": nameId },
|
|
||||||
|
|
||||||
success: function(response) {
|
|
||||||
var items2 = [];
|
|
||||||
|
|
||||||
$.each(response,
|
|
||||||
function(key, val) {
|
|
||||||
items2.push({ id: key, vall: val });
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//document.getElementById("InsurancCode").innerHTML = items2[1].vall;
|
|
||||||
|
|
||||||
|
|
||||||
$.each(response.employeeList, function(i, item)
|
|
||||||
{
|
|
||||||
$('#getPersonnel').append($('<option>',
|
|
||||||
{
|
|
||||||
value: item.id,
|
|
||||||
text: item.employeeFullName
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
failure: function(response) {
|
|
||||||
console.log(5, response);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function loadWorkshopWithCode() {
|
|
||||||
|
|
||||||
var myArray = document.getElementById('getWorkshopWithCode').options.selectedIndex;
|
|
||||||
document.getElementById("getWorkshopWithName").options.selectedIndex = myArray;
|
|
||||||
var getNameId = document.getElementById("getWorkshopWithName");
|
|
||||||
var getWithName = getNameId.options[getNameId.selectedIndex];
|
|
||||||
|
|
||||||
document.getElementById("select2-getWorkshopWithName-container").innerHTML = getWithName.text;
|
|
||||||
|
|
||||||
loadWorkshopWithName();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function loadPersonnel() {
|
|
||||||
const id = document.getElementById("getPersonnel").value;
|
|
||||||
const workshopId = document.getElementById("getWorkshopWithName").value;
|
|
||||||
|
|
||||||
if (workshopId == "WorkshopIds") {
|
|
||||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ',"ابتدا کارگاه را انتخاب نمایید");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (id > 0 && workshopId != "WorkshopIds") {
|
|
||||||
$.ajax({
|
|
||||||
//contentType: 'application/json; charset=utf-8',
|
|
||||||
dataType: 'json',
|
|
||||||
type: 'POST',
|
|
||||||
url: '@Url.Page("/Company/Contracts/Index", "LoadPersonel")',
|
|
||||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
|
||||||
data: { "id": id, "workshopId": workshopId },
|
|
||||||
|
|
||||||
success: function (response) {
|
|
||||||
var items2 = [];
|
|
||||||
$.each(response, function (key, val) {
|
|
||||||
items2.push({ id: key, vall: val });
|
|
||||||
|
|
||||||
});
|
|
||||||
//if (items2[8].vall == "")
|
|
||||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ',"ابتدا تاریخ شروع به کار را در بخش پرسنل <br/>برای این شخص و کارگاه مورد نظر ایجاد نموده و سپس اقدام به ایجاد قرارداد نمایید");
|
|
||||||
//document.getElementById("FatherName").innerHTML = items2[1].vall;
|
|
||||||
//document.getElementById("PersonnelNationalCode").innerHTML = items2[2].vall;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
failure: function (response) {
|
|
||||||
console.log(5, response);
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,247 +0,0 @@
|
|||||||
@model CompanyManagment.App.Contracts.Leave.EditLeave
|
|
||||||
@{
|
|
||||||
|
|
||||||
//int i = 1;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@{
|
|
||||||
<style>
|
|
||||||
.panel-title {
|
|
||||||
font-size: 14px;
|
|
||||||
text-transform: uppercase;
|
|
||||||
margin-bottom: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
padding: 5px 7px 5px 7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rad {
|
|
||||||
border-radius: 8px !important;
|
|
||||||
/* padding: 10px; */
|
|
||||||
padding: 2px 5px 0px 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.faSize {
|
|
||||||
font-size: 22px !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
}
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
|
|
||||||
<form asp-page="./Index" asp-page-handler="EditPaidLeave" autocomplete="off"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true"
|
|
||||||
data-callback=""
|
|
||||||
data-action="ReloadPaidLeave">
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
|
|
||||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 150px; text-align: center;"> مرخصی استحقاقی </legend>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<fieldset style="border: 1px solid #c3c3c3; background-color: #ddd; border-radius: 10px; padding: 5px 0 5px 0; margin-bottom: 10px; ">
|
|
||||||
<div class="form-group">
|
|
||||||
<div class="col-md-4" style="margin-top: 3px">
|
|
||||||
نوع مرخصی <span style="color: red">*</span>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" id="roozaneh">
|
|
||||||
روزانه <input class="roozane" type="radio" value="روزانه" asp-for="PaidLeaveType">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" id="saati">
|
|
||||||
ساعتی <input class="saati" type="radio" value="ساعتی" asp-for="PaidLeaveType">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<span asp-validation-for="PaidLeaveType" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row m-t-10">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="form-group m-b-0" dir="rtl">
|
|
||||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
|
||||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInputb" onchange="validDate(this);" asp-for="StartLeave" />
|
|
||||||
|
|
||||||
<span asp-validation-for="StartLeave" class="error"></span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="form-group m-b-0" dir="rtl">
|
|
||||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
|
||||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInputb" onchange="validDate(this);" asp-for="EndLeave" />
|
|
||||||
|
|
||||||
<span asp-validation-for="EndLeave" class="error"></span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="form-group m-b-0" dir="rtl">
|
|
||||||
<label asp-for="LeaveHourses" class="control-label m-r-5">ساعت</label>
|
|
||||||
<input id="hours" dir="ltr" maxlength="2" style="text-align: center" class="form-control persianDateInputb" asp-for="LeaveHourses" />
|
|
||||||
|
|
||||||
<span asp-validation-for="LeaveHourses" class="error"></span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
@* <input type="hidden" asp-for="WorkshopId" />*@
|
|
||||||
<div class="modal-footer">
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
|
|
||||||
|
|
||||||
<a href="#showmodal=@Url.Page("/Company/Contracts/Index", "CreatePaidLeave", new { employeeId = @Model.EmployeeId, hd = 1 })" class="btn btn-default btn-rounded waves-effect waves-light m-b-5"> بازگشت</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
|
||||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
|
||||||
<script>
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(
|
|
||||||
function () {
|
|
||||||
var saati = $('input:radio[class="saati"]');
|
|
||||||
var roozane = $('input:radio[class="roozane"]');
|
|
||||||
if ($(roozane).is(':checked') && $(roozane).val() == 'روزانه') {
|
|
||||||
|
|
||||||
$("#hours").val('');
|
|
||||||
$("#hours").attr("disabled", "disabled");
|
|
||||||
$("#endLeave").removeAttr("disabled");
|
|
||||||
$("#saati").css("visibility", "hidden");
|
|
||||||
} else if ($(saati).is(':checked') && $(saati).val() == 'ساعتی') {
|
|
||||||
|
|
||||||
$("#endLeave").val('');
|
|
||||||
$("#endLeave").attr("disabled", "disabled");
|
|
||||||
$("#hours").removeAttr("disabled");
|
|
||||||
$("#roozaneh").css("visibility", "hidden");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function validDate(inputField) {
|
|
||||||
|
|
||||||
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = inputField.value;
|
|
||||||
|
|
||||||
var m1, m2;
|
|
||||||
var y1, y2, y3, y4;
|
|
||||||
var d1, d2;
|
|
||||||
var s1, s2;
|
|
||||||
for (var i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 4) {
|
|
||||||
s1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 7) {
|
|
||||||
s2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
var yRes = y1 + y2 + y3 + y4;
|
|
||||||
var year = parseInt(yRes);
|
|
||||||
var mRes = m1 + m2;
|
|
||||||
var month = parseInt(mRes);
|
|
||||||
var dRes = d1 + d2;
|
|
||||||
var day = parseInt(dRes);
|
|
||||||
var FixResult = yRes + s1 + mRes + s2 + dRes;
|
|
||||||
|
|
||||||
|
|
||||||
var isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(FixResult);
|
|
||||||
|
|
||||||
|
|
||||||
if (isValid) {
|
|
||||||
inputField.style.backgroundColor = '#a6e9a6';
|
|
||||||
$("button[type=submit]").attr('disabled', false);
|
|
||||||
validCheck = true;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
inputField.style.backgroundColor = '#f94c4c';
|
|
||||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
|
||||||
$("button[type=submit]").attr('disabled', true);
|
|
||||||
validCheck = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
return validCheck;
|
|
||||||
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
setTimeout(function () {
|
|
||||||
|
|
||||||
window.location.hash = "##";
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,366 +0,0 @@
|
|||||||
@model CompanyManagment.App.Contracts.Leave.EditLeave
|
|
||||||
|
|
||||||
@{
|
|
||||||
}
|
|
||||||
<link href="@Href("~/Clienttheme/css/sickLeave.css")" rel="stylesheet" />
|
|
||||||
<div class="container" id="sickLeaveEdit">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
</div>
|
|
||||||
<form id="EditForm" asp-page="./Index" asp-page-handler="EditSickLeave" autocomplete="off" class="sickLeave"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true">
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<fieldset style="border: 1px solid #999797; border-radius: 17px; padding: revert">
|
|
||||||
<legend style="margin-bottom: 5px; font-size: 16px; color: #505458; width: 150px; text-align: center;"> مرخصی استعلاجی </legend>
|
|
||||||
<div class="row m-t-10 m-b-10 d-flex">
|
|
||||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
|
||||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="StartLeave" />
|
|
||||||
<span asp-validation-for="StartLeave" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
|
||||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="EndLeave" />
|
|
||||||
<span asp-validation-for="EndLeave" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div id="data-SickLeave" class="row">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
|
||||||
<div class="modal-footer">
|
|
||||||
|
|
||||||
@*<a data-dismiss="modal" class="btn btn-default btn-rounded waves-effect waves-light m-b-5"> بازگشت</a>*@
|
|
||||||
<a href="#showmodal=@Url.Page("/Company/Employees/Index", "CreateSickLeave", new { employeeId = @Model.EmployeeId, workshopId = @Model.WorkshopId, hd = 1 })" class="btn btn-default btn-rounded waves-effect waves-light" id="close"> بازگشت</a>
|
|
||||||
<a href="#" onclick="editSickLeave()" class="btn btn-success btn-rounded waves-effect waves-light" style="background: #0f9500;border: #0f9500;">ذخیره</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
|
|
||||||
function editSickLeave(){
|
|
||||||
$("#EditForm").submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).on("click", function (event) {
|
|
||||||
var target = $(event.target);
|
|
||||||
if (!target.is("#sickLeaveEdit")
|
|
||||||
&& !target.is("#sickLeaveEdit *")
|
|
||||||
) {
|
|
||||||
$(".datepicker-container").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#close , .close").on('click', function () {
|
|
||||||
$(".datepicker-container").hide();
|
|
||||||
});
|
|
||||||
$('#EditForm').submit(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: $(this).attr( 'action' ),
|
|
||||||
data: $(this).serialize(),
|
|
||||||
success: function (response) {
|
|
||||||
if (response.isSuccedded == true) {
|
|
||||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
|
||||||
reloadSickLeaveList();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
function reloadSickLeaveList(){
|
|
||||||
$("#data-SickLeave").html('');
|
|
||||||
$("#data-SickLeave").html('<div class="ring"> منتظر بمانید<span></span></div>');
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Page("/Company/Employees/Index", "SickList")',
|
|
||||||
data:{"employeeId":@Model.EmployeeId,"workshopId_":@Model.WorkshopId },
|
|
||||||
type: "Get",
|
|
||||||
dataType: 'html',
|
|
||||||
success: function(data) {
|
|
||||||
$('#data-SickLeave').html(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
setTimeout(function () {
|
|
||||||
|
|
||||||
window.location.hash = "##";
|
|
||||||
}, 1000);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
$(".persianDateInput").on('keyup', function () {
|
|
||||||
if (event.which !== 8 && event.which !== 46) {
|
|
||||||
let value = $(this).val();
|
|
||||||
let lengthValue = value.length;
|
|
||||||
if (lengthValue === 4) {
|
|
||||||
value += '/'
|
|
||||||
}
|
|
||||||
if (lengthValue === 7) {
|
|
||||||
value += '/'
|
|
||||||
}
|
|
||||||
$(this).val(value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(".persianDateInput").on('blur', function () {
|
|
||||||
let value = $(this).val();
|
|
||||||
let lengthValue = value.length;
|
|
||||||
if (!dateValidCheck(this)) {
|
|
||||||
$(this).addClass("errored");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$(this).removeClass("errored");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function checkEnValid(fixDate1) {
|
|
||||||
|
|
||||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = fixDate1;
|
|
||||||
|
|
||||||
let m1, m2;
|
|
||||||
let y1, y2, y3, y4;
|
|
||||||
let d1, d2;
|
|
||||||
for (let i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let yRes = y1 + y2 + y3 + y4;
|
|
||||||
let year = parseInt(yRes);
|
|
||||||
let mRes = m1 + m2;
|
|
||||||
let month = parseInt(mRes);
|
|
||||||
let dRes = d1 + d2;
|
|
||||||
let day = parseInt(dRes);
|
|
||||||
let kabiseh = false;
|
|
||||||
if (month <= 6 && day > 31) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (month > 6 && month < 12 && day > 30) {
|
|
||||||
return false;
|
|
||||||
} else if (month === 12) {
|
|
||||||
|
|
||||||
switch (year) {
|
|
||||||
case 1346:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1350:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1354:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1358:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1362:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1366:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1370:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1375:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1379:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1383:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1387:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1391:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1395:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1399:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1403:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1408:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1412:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1416:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1420:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1424:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1428:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1432:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1436:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1441:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1445:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
kabiseh = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (kabiseh == true && day > 30) {
|
|
||||||
return false;
|
|
||||||
} else if (kabiseh == false && day > 29) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
function dateValidcheck(inputField1) {
|
|
||||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = inputField1.value;
|
|
||||||
|
|
||||||
let m1, m2;
|
|
||||||
let y1, y2, y3, y4;
|
|
||||||
let d1, d2;
|
|
||||||
let s1, s2;
|
|
||||||
for (var i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 4) {
|
|
||||||
s1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 7) {
|
|
||||||
s2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let yRes = y1 + y2 + y3 + y4;
|
|
||||||
let year = parseInt(yRes);
|
|
||||||
let mRes = m1 + m2;
|
|
||||||
let month = parseInt(mRes);
|
|
||||||
let dRes = d1 + d2;
|
|
||||||
let day = parseInt(dRes);
|
|
||||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
|
||||||
let test1 = checkEnValid(inputField1.value);
|
|
||||||
|
|
||||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
|
||||||
|
|
||||||
|
|
||||||
if (isValid && test1) {
|
|
||||||
//inputField1.addClass("errored");
|
|
||||||
inputField1.style.boxShadow = 'none';
|
|
||||||
inputField1.style.border = '1px solid #c7c7c7';
|
|
||||||
start1valid = true;
|
|
||||||
} else {
|
|
||||||
if (inputField1.value != "") {
|
|
||||||
//inputField1.addClass("errored");
|
|
||||||
inputField1.style.boxShadow = 'inset 0 0 2px #eb3434, 0 0 5px #eb3434';
|
|
||||||
inputField1.style.border = '1px solid #eb3434';
|
|
||||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
|
||||||
start1valid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return start1valid;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,730 +0,0 @@
|
|||||||
@page
|
|
||||||
@using Version = _0_Framework.Application.Version
|
|
||||||
@model EmployeePaymentModel
|
|
||||||
|
|
||||||
@{
|
|
||||||
Layout = "Shared/_ClientLayout";
|
|
||||||
ViewData["title"] = " - حساب پرداخت به حقوق";
|
|
||||||
var index = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@section Styles {
|
|
||||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
|
||||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
|
||||||
|
|
||||||
@* This link called grid must be included, unless the table of payment wont work corectly *@
|
|
||||||
<link href="~/AssetsClient/css/table-grid.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
|
||||||
@* This link called grid must be included, unless the table of payment wont work corectly *@
|
|
||||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
|
||||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
#my-scrollbar {
|
|
||||||
height: auto;
|
|
||||||
max-height: 200px;
|
|
||||||
overflow-x: hidden;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
<!-- MAIN CONTENT -->
|
|
||||||
<div class="content-container">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row p-2">
|
|
||||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
|
||||||
<div class="col d-flex align-items-center justify-content-start">
|
|
||||||
<img src="~/AssetsClient/images/personalList.png" alt="" class="img-fluid me-2" style="width: 45px;"/>
|
|
||||||
<div>
|
|
||||||
<h4 class="title d-flex align-items-center">صورت حساب پرداخت به حقوق</h4>
|
|
||||||
<div>@Model.WorkshopFullName</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<a asp-page="/Company/Employees/Index" asp-route-id="@Model.WorkshopId" class="back-btn" type="button">
|
|
||||||
<span>بازگشت</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Search Box -->
|
|
||||||
|
|
||||||
<form role="form" method="get" name="search-theme-form1" id="search-theme-form1" autocomplete="off">
|
|
||||||
|
|
||||||
<input type="hidden" asp-for="WorkshopId"/>
|
|
||||||
<input type="hidden" asp-for="EmployeeId"/>
|
|
||||||
|
|
||||||
<div class="container-fluid d-none d-lg-block">
|
|
||||||
<div class="row px-2">
|
|
||||||
<div class="search-box card border-0">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="title mb-1">مرتب سازی</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-9">
|
|
||||||
<div class="d-grid grid-cols-5 gap-2" data-title="جستجو لیست قرارداد" data-intro="شما در این لیست قرارداد میتوانید جستجو کنید.">
|
|
||||||
|
|
||||||
<div class="wrapper-dropdown-year btn-dropdown" id="dropdown-year">
|
|
||||||
<span class="selected-display" id="destination-year">سال</span>
|
|
||||||
<svg class="arrow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="transition-all ml-auto rotate-180">
|
|
||||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
||||||
</svg>
|
|
||||||
<ul class="dropdown-year boxes" id="my-scrollbar">
|
|
||||||
<li class="item" value-data-year="0">سال</li>
|
|
||||||
@foreach (var year in Model.YearlyList)
|
|
||||||
{
|
|
||||||
<li class="item" value-data-year="@year">@year</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
<input type="hidden" id="sendDropdownYear" asp-for="SearchModel.Year"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="wrapper-dropdown-month btn-dropdown" id="dropdown-month">
|
|
||||||
<span class="selected-display" id="destination-month">ماه</span>
|
|
||||||
<svg class="arrow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="transition-all ml-auto rotate-180">
|
|
||||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
||||||
</svg>
|
|
||||||
<ul class="dropdown-month boxes">
|
|
||||||
<li class="item" value-data-month="0">ماه</li>
|
|
||||||
<li class="item" value-data-month="01">فروردین</li>
|
|
||||||
<li class="item" value-data-month="02">اردیبهشت</li>
|
|
||||||
<li class="item" value-data-month="03">خرداد</li>
|
|
||||||
<li class="item" value-data-month="04">تیر</li>
|
|
||||||
<li class="item" value-data-month="05">مرداد</li>
|
|
||||||
<li class="item" value-data-month="06">شهریور</li>
|
|
||||||
<li class="item" value-data-month="07">مهر</li>
|
|
||||||
<li class="item" value-data-month="08">آبان</li>
|
|
||||||
<li class="item" value-data-month="09">آذر</li>
|
|
||||||
<li class="item" value-data-month="10">دی</li>
|
|
||||||
<li class="item" value-data-month="11">بهمن</li>
|
|
||||||
<li class="item" value-data-month="12">اسفند</li>
|
|
||||||
</ul>
|
|
||||||
<input type="hidden" id="sendDropdownMonth" asp-for="SearchModel.Month"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3">
|
|
||||||
<div class="d-flex gap-2 justify-content-end">
|
|
||||||
<a asp-page="/Company/Employees/EmployeePayment" asp-route-workshopId="@Model.WorkshopId" asp-route-employeeId="@Model.EmployeeId" class="btn-view-all text-nowrap align-items-center">
|
|
||||||
<span>حذف فیلتر</span>
|
|
||||||
</a>
|
|
||||||
<button class="btn-search btn-search-click text-nowrap d-flex align-items-center" id="searchBtn" type="submit">
|
|
||||||
<span>جستجو</span>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
||||||
<circle cx="11" cy="11" r="6" stroke="white"/>
|
|
||||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<!-- End Search Box -->
|
|
||||||
|
|
||||||
<form role="form" method="post" name="create-leave-form" id="create-payment-to-employee-form" autocomplete="off">
|
|
||||||
<!-- Start Payment Box -->
|
|
||||||
<div class="container-fluid d-none d-md-block">
|
|
||||||
<div class="row px-2">
|
|
||||||
<div class="search-box card border-0">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-9">
|
|
||||||
<div class="d-grid grid-cols-4 gap-2">
|
|
||||||
|
|
||||||
<input type="hidden" asp-for="Command.EmployeeId">
|
|
||||||
<input type="hidden" asp-for="Command.WorkshopId">
|
|
||||||
|
|
||||||
<input type="text" class="date" id="date" asp-for="Command.CreatePaymentToEmployeeItem.PayDateFa" placeholder="تاریخ">
|
|
||||||
<input type="text" placeholder="شماره سند حسابداری">
|
|
||||||
<input type="text" asp-for="Command.CreatePaymentToEmployeeItem.SourceBankName" placeholder="بانک مبدا">
|
|
||||||
<input type="text" asp-for="Command.CreatePaymentToEmployeeItem.DestinationBankName" placeholder="بانک مقصد">
|
|
||||||
<div class="gap-2 mt-2" id="payment_input_change" style="display: none;"></div>
|
|
||||||
|
|
||||||
@* <input type="text" name="" id="" placeholder="تاریخ">
|
|
||||||
<input type="text" name="" id="" placeholder="ساعت"> *@
|
|
||||||
|
|
||||||
<select class="form-select" name="" id="payment_method">
|
|
||||||
<option value="0">نحوه پرداخت</option>
|
|
||||||
<option value="1">نقدی</option>
|
|
||||||
<option value="2">آنلاین</option>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<input type="text" name="" id="" placeholder="عنوان پرداخت">
|
|
||||||
</div>
|
|
||||||
<div class="gap-2 mt-2" id="payment_input_change1" style="display: none;">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3">
|
|
||||||
<div class="d-flex gap-2 justify-content-end">
|
|
||||||
<input type="text" asp-for="Command.CreatePaymentToEmployeeItem.PaymentFa" placeholder="مبلغ (ريال)">
|
|
||||||
<a href="#" id="save" class="btn-search">
|
|
||||||
<span>ثبت</span>
|
|
||||||
</a>
|
|
||||||
<button style="display: none;" type="submit" id="saveFinaly"></button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End Payment Box -->
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<!-- List Items -->
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row p-lg-2 p-auto">
|
|
||||||
|
|
||||||
<!-- Advance Search Box -->
|
|
||||||
<div class="container-fluid d-block d-md-none">
|
|
||||||
<div class="row d-flex align-items-center justify-content-between">
|
|
||||||
<div class="search-box bg-white">
|
|
||||||
<div class="col text-center">
|
|
||||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
|
||||||
<span>جستجو پیشرفته</span>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
||||||
<circle cx="11" cy="11" r="6" stroke="white"/>
|
|
||||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End Advance Search Box -->
|
|
||||||
|
|
||||||
<div class="wrapper list-box bg-white personal-payment-grid-wrapper">
|
|
||||||
<div class="personal-payment-grid">
|
|
||||||
|
|
||||||
<div class="Rtable Rtable--5cols Rtable--collapse personal-payment-grid-list">
|
|
||||||
|
|
||||||
<div class="Rtable-row Rtable-row--head align-items-center d-grid gap-2 grid-cols-12">
|
|
||||||
<div class="d-flex col-span-2">
|
|
||||||
<div class="Rtable-cell column-heading width1">سال</div>
|
|
||||||
<div class="Rtable-cell column-heading width2">ماه</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex col-span-7">
|
|
||||||
<div class="Rtable-cell column-heading width3">تاریخ پرداخت</div>
|
|
||||||
<div class="Rtable-cell column-heading width4">بانک مبداء</div>
|
|
||||||
<div class="Rtable-cell column-heading width5">بانک مقصد</div>
|
|
||||||
<div class="Rtable-cell column-heading width6">مبلغ (ریال)</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex col-span-3">
|
|
||||||
<div class="Rtable-cell column-heading width7"></div>
|
|
||||||
<div class="Rtable-cell column-heading width8"></div>
|
|
||||||
<div class="Rtable-cell column-heading width9"></div>
|
|
||||||
<div class="Rtable-cell column-heading width10"></div>
|
|
||||||
<div class="Rtable-cell column-heading width11"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="w-100 personal-payment-scroll">
|
|
||||||
<!-- this empty div must be initial for color -->
|
|
||||||
<div></div>
|
|
||||||
<!-- this empty div must be initial for color -->
|
|
||||||
|
|
||||||
|
|
||||||
@foreach (var paymentList in Model.PaymentToEmployeeSearch)
|
|
||||||
{
|
|
||||||
<div class="personal-grid-row d-grid gap-2 grid-cols-12 w-100">
|
|
||||||
|
|
||||||
<div class="Rtable-row align-items-center col-span-2">
|
|
||||||
<div class="Rtable-cell width1">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
@paymentList.Year
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width2">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
@paymentList.Month
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-span-7">
|
|
||||||
@if (paymentList.PaymentToEmployeeItemList.Count > 0)
|
|
||||||
{
|
|
||||||
@foreach (var paymentItem in paymentList.PaymentToEmployeeItemList)
|
|
||||||
{
|
|
||||||
var StylePadding = "";
|
|
||||||
@if (paymentList.PaymentToEmployeeItemList.Count == 1)
|
|
||||||
{
|
|
||||||
StylePadding = "padding: 28px 10px 28px 10px;";
|
|
||||||
}
|
|
||||||
|
|
||||||
<div class="Rtable-row align-items-center w-100" style="@StylePadding">
|
|
||||||
<div class="Rtable-cell width3">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
@paymentItem.PayDateFa
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width4">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<p class="m-0">@paymentItem.SourceBankName</p>
|
|
||||||
<p class="m-0">@paymentItem.SourceBankAccountNumber</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width5">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<p class="m-0">@paymentItem.DestinationBankName</p>
|
|
||||||
<p class="m-0">@paymentItem.DestinationBankAccountNumber</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width6">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
@(paymentItem.PaymentFa) ريال
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<div class="Rtable-row align-items-center w-100" style="padding: 28px 10px 28px 10px;">
|
|
||||||
<div class="Rtable-cell width3">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
-
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width4">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<p class="m-0">-</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width5">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<p class="m-0">-</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width6">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
-
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="Rtable-row align-items-center col-span-3 position-relative" style="padding: 0 0 40px 0;">
|
|
||||||
<div class="Rtable-cell width7">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
@* <div class="text-price">@paymentList.BonusesPay</div> *@
|
|
||||||
<p class="my-1 ">جمع پرداختی</p>
|
|
||||||
<p class="my-0 text-price">
|
|
||||||
@{
|
|
||||||
if (!string.IsNullOrWhiteSpace(paymentList.PaymentToEmployeeTotalPayment))
|
|
||||||
{
|
|
||||||
<span>@paymentList.PaymentToEmployeeTotalPayment ریال</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<span>
|
|
||||||
-
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p class="my-0">
|
|
||||||
@{
|
|
||||||
if (!string.IsNullOrWhiteSpace(paymentList.ComputePaymentToEmployeeTotalPayment))
|
|
||||||
{
|
|
||||||
<span>@paymentList.ComputePaymentToEmployeeTotalPayment ریال</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<span>
|
|
||||||
-
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="Rtable-cell width8">
|
|
||||||
<div class="Rtable-cell--content">
|
|
||||||
<p class="my-1 ">نمایش فیش حقوقی</p>
|
|
||||||
<p class="my-0 text-price">
|
|
||||||
@{
|
|
||||||
if (!string.IsNullOrWhiteSpace(paymentList.CheckoutTotalPayment))
|
|
||||||
{
|
|
||||||
<span>@paymentList.CheckoutTotalPayment ریال</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<span>
|
|
||||||
-
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<p class="my-0">
|
|
||||||
@{
|
|
||||||
if (!string.IsNullOrWhiteSpace(paymentList.ComputeCheckoutTotalPayment))
|
|
||||||
{
|
|
||||||
<span>@paymentList.ComputeCheckoutTotalPayment ریال</span>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<span>
|
|
||||||
-
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@* <div class="d-flex all-sum-price">
|
|
||||||
<p class="my-0 mx-2">مجموع: </p>
|
|
||||||
<p class="my-0 mx-2">@paymentList.TotalPayment</p>
|
|
||||||
</div> *@
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Start Result box or Summarry box -->
|
|
||||||
<div class="d-grid gap-2 grid-cols-12 justify-content-end personal-payment-result1">
|
|
||||||
<div class="col-span-1">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-span-6">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-span-5">
|
|
||||||
<div class="d-flex align-items-center justify-content-end">
|
|
||||||
<div class="d-flex mx-1 result-pay">
|
|
||||||
<p class="my-0">74,000,000</p>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex mx-1 result-pay">
|
|
||||||
<p class="my-0">74,000,000</p>
|
|
||||||
</div>
|
|
||||||
<div class="d-flex mx-1 result-pay">
|
|
||||||
<p class="my-0">74,000,000</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="d-grid gap-2 grid-cols-12 personal-payment-result2">
|
|
||||||
<div class="col-span-1">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-span-6">
|
|
||||||
<div class="d-flex align-items-center justify-content-end">
|
|
||||||
<p class="my-0">مجموع پرداختی های کارفرما</p>
|
|
||||||
<div class="d-flex mx-1 result-pay">
|
|
||||||
<p class="my-0">74,000,000</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-span-5">
|
|
||||||
<div class="d-flex align-items-center justify-content-start">
|
|
||||||
<div class="d-flex mx-1 result-pay">
|
|
||||||
<p class="my-0">74,000,000</p>
|
|
||||||
</div>
|
|
||||||
<p class="my-0">مجموع مطالبات پرسنل</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End Result box or Summarry box -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End List Items -->
|
|
||||||
</div>
|
|
||||||
<!-- END MAIN CONTENT -->
|
|
||||||
<!-- Modal From Bottom For Advance Search -->
|
|
||||||
<div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
|
|
||||||
<div class="modal-dialog modal-fullscreen">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header d-block text-center pb-0">
|
|
||||||
<div class="iphone-line mx-auto mb-3"></div>
|
|
||||||
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="modal-body pt-0 mb-3">
|
|
||||||
<div class="container-fluid search-box">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-12 text-start mb-4">
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" class="form-control" placeholder="نام و نام خانوادگی پرسنل ...">
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" class="form-control" name="" id="" placeholder="کد ملی ...">
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<input type="text" class="form-control" name="" id="" placeholder="شماره بیمه ...">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-12 text-start">
|
|
||||||
<p class="mb-3">جستجو براساس</p>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6">
|
|
||||||
<input type="radio" class="btn-check" name="btnradio" id="active" autocomplete="off" checked>
|
|
||||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="active">پرسنلهای غیر فعال</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-6">
|
|
||||||
<input type="radio" class="btn-check" name="btnradio" id="deactive" autocomplete="off">
|
|
||||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="deactive">پرسنلهای فعال</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-footer justify-content-center align-items-center">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-6 text-end">
|
|
||||||
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">بستن</button>
|
|
||||||
</div>
|
|
||||||
<div class="col-6 text-start">
|
|
||||||
<button type="button" class="btn-search w-100">جستجو</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- End Modal From Bottom For Advance Search -->
|
|
||||||
|
|
||||||
|
|
||||||
@section Script {
|
|
||||||
<script src="~/AssetsClient/js/dropdown.js?ver=@Version.StyleVersion"></script>
|
|
||||||
<script src="~/assetsclient/js/smooth-scrollbar.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
//******************** اسکرول سال ********************
|
|
||||||
const Scrollbar = window.Scrollbar;
|
|
||||||
Scrollbar.init(document.querySelector('#my-scrollbar'));
|
|
||||||
//******************** اسکرول سال ********************
|
|
||||||
|
|
||||||
|
|
||||||
//******************** مربوط به روش پرداخت ********************
|
|
||||||
$('#payment_method').on('change',
|
|
||||||
function() {
|
|
||||||
const payment_input_change = $('#payment_input_change').html('');
|
|
||||||
console.log($(this).val());
|
|
||||||
if ($(this).val() == 1) {
|
|
||||||
payment_input_change.append(`
|
|
||||||
<input type="text" name="" id="" placeholder="شماره چک">`);
|
|
||||||
payment_input_change.show();
|
|
||||||
} else if ($(this).val() == 2) {
|
|
||||||
payment_input_change.append(`
|
|
||||||
<input type="text" name="" id="" placeholder="بانک مبداء">
|
|
||||||
<input type="text" name="" id="" placeholder="شماره حساب / شبا / کارت">
|
|
||||||
<input type="text" name="" id="" placeholder="بانک مقصد">
|
|
||||||
<input type="text" name="" id="" placeholder="شماره حساب / شبا / کارت">`);
|
|
||||||
payment_input_change.show();
|
|
||||||
} else if ($(this).val() == 0) {
|
|
||||||
payment_input_change.html('');
|
|
||||||
payment_input_change.hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//******************** مربوط به روش پرداخت ********************
|
|
||||||
|
|
||||||
|
|
||||||
//************************ مربوط به جستجوی سال و ماه در قسمت دسکتاپ ************************//
|
|
||||||
const selectedAll = document.querySelectorAll(".wrapper-dropdown");
|
|
||||||
|
|
||||||
var wrapperDropdown = $(".wrapper-dropdown");
|
|
||||||
|
|
||||||
wrapperDropdown.on("click",
|
|
||||||
function() {
|
|
||||||
var dropdown = $(this);
|
|
||||||
const optionsContainer = dropdown.children(".dropdown");
|
|
||||||
var optionsList = optionsContainer.find(".item");
|
|
||||||
|
|
||||||
dropdown.toggleClass("active");
|
|
||||||
|
|
||||||
if (dropdown.hasClass("active")) {
|
|
||||||
wrapperDropdown.not(this).removeClass("active");
|
|
||||||
}
|
|
||||||
|
|
||||||
optionsList.on("click",
|
|
||||||
function() {
|
|
||||||
const selectedOption = $(this);
|
|
||||||
const valueData = selectedOption.data("value");
|
|
||||||
|
|
||||||
dropdown.removeClass("active");
|
|
||||||
dropdown.find(".selected-display").text(selectedOption.text());
|
|
||||||
$("#sendSorting").val(valueData);
|
|
||||||
|
|
||||||
optionsList.removeClass("active");
|
|
||||||
selectedOption.addClass("active");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.dropdown-year .item').on("click",
|
|
||||||
function() {
|
|
||||||
console.log(1111);
|
|
||||||
const dataVal = $(this).attr("value-data-year");
|
|
||||||
$('#sendDropdownYear').val(dataVal);
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.dropdown-month .item').on("click",
|
|
||||||
function() {
|
|
||||||
const dataVal = $(this).attr("value-data-month");
|
|
||||||
$('#sendDropdownMonth').val(dataVal);
|
|
||||||
});
|
|
||||||
|
|
||||||
const sendDropdownYear = $("#sendDropdownYear").val();
|
|
||||||
if (sendDropdownYear) {
|
|
||||||
const itemDropdownYear = $(".dropdown-year").find(`.item[value-data-year='${sendDropdownYear}']`);
|
|
||||||
itemDropdownYear.addClass("active");
|
|
||||||
const selectedYearDisplay = $(".wrapper-dropdown-year").find(".selected-display");
|
|
||||||
selectedYearDisplay.text(itemDropdownYear.text());
|
|
||||||
}
|
|
||||||
|
|
||||||
const sendDropdownMonth = $("#sendDropdownMonth").val();
|
|
||||||
if (sendDropdownMonth) {
|
|
||||||
const itemDropdownMonth = $(".dropdown-month").find(`.item[value-data-month='${sendDropdownMonth}']`);
|
|
||||||
itemDropdownMonth.addClass("active");
|
|
||||||
const selectedMonthDisplay = $(".wrapper-dropdown-month").find(".selected-display");
|
|
||||||
selectedMonthDisplay.text(itemDropdownMonth.text());
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if anything else ofther than the dropdown is clicked
|
|
||||||
window.addEventListener("click",
|
|
||||||
function(e) {
|
|
||||||
if (e.target.closest(".wrapper-dropdown") === null) {
|
|
||||||
closeAllDropdowns();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// close all the dropdowns
|
|
||||||
function closeAllDropdowns() {
|
|
||||||
const selectedAll = document.querySelectorAll(".wrapper-dropdown");
|
|
||||||
selectedAll.forEach((selected) => {
|
|
||||||
const optionsContainer = selected.children[2];
|
|
||||||
const arrow = selected.children[1];
|
|
||||||
|
|
||||||
handleDropdown(selected, arrow, false);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// open all the dropdowns
|
|
||||||
function handleDropdown(dropdown, arrow, open) {
|
|
||||||
if (open) {
|
|
||||||
arrow.classList.add("rotated");
|
|
||||||
dropdown.classList.add("active");
|
|
||||||
} else {
|
|
||||||
arrow.classList.remove("rotated");
|
|
||||||
dropdown.classList.remove("active");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//************************ مربوط به جستجوی سال و ماه در قسمت دسکتاپ ************************//
|
|
||||||
|
|
||||||
|
|
||||||
//************************ عملیات ذخیره سازی پرداخت حقوق به پرسنل ************************//
|
|
||||||
$(".date").mask("0000/00/00");
|
|
||||||
$('.date').on('input',
|
|
||||||
function() {
|
|
||||||
const Date = this.value;
|
|
||||||
if (Date.length == 10) {
|
|
||||||
const submitcheck = dateValidcheck(this);
|
|
||||||
if (submitcheck) {
|
|
||||||
$(this).removeClass('errored');
|
|
||||||
} else {
|
|
||||||
$(this).addClass('errored');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$(this).addClass('errored');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#date').on("keyup",
|
|
||||||
function() {
|
|
||||||
const isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
|
||||||
if (isValid) {
|
|
||||||
$(this).addClass("validTime");
|
|
||||||
$(this).removeClass("invalidTime");
|
|
||||||
} else {
|
|
||||||
$(this).removeClass("validTime");
|
|
||||||
$(this).addClass("invalidTime");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#save').on('click',
|
|
||||||
function() {
|
|
||||||
if ($('.errored').length < 1) {
|
|
||||||
$.ajax({
|
|
||||||
async: false,
|
|
||||||
dataType: 'json',
|
|
||||||
type: 'POST',
|
|
||||||
url: '@Url.Page("./EmployeePayment", "PaymentToPersonnelSave")',
|
|
||||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
|
||||||
data: $('#create-payment-to-employee-form').serialize(),
|
|
||||||
success: function(response) {
|
|
||||||
if (response.isSuccedded) {
|
|
||||||
$('.alert-success-msg').show();
|
|
||||||
$('.alert-success-msg p').text(response.message);
|
|
||||||
setTimeout(function() {
|
|
||||||
$('.alert-success-msg').hide();
|
|
||||||
$('.alert-success-msg p').text('');
|
|
||||||
},
|
|
||||||
3500);
|
|
||||||
window.location.reload();
|
|
||||||
} else {
|
|
||||||
$('.alert-msg').show();
|
|
||||||
$('.alert-msg p').text(response.message);
|
|
||||||
setTimeout(function() {
|
|
||||||
$('.alert-msg').hide();
|
|
||||||
$('.alert-msg p').text('');
|
|
||||||
},
|
|
||||||
3500);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: function(err) {
|
|
||||||
console.log(err);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
$('.alert-msg').show();
|
|
||||||
$('.alert-msg p').text('لطفا خطاها را برطرف کنید.');
|
|
||||||
setTimeout(function() {
|
|
||||||
$('.alert-msg').hide();
|
|
||||||
$('.alert-msg p').text('');
|
|
||||||
},
|
|
||||||
3500);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//************************ عملیات ذخیره سازی پرداخت حقوق به پرسنل ************************//
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
using _0_Framework.Application;
|
|
||||||
using CompanyManagment.App.Contracts.Employee;
|
|
||||||
using CompanyManagment.App.Contracts.PaymentToEmployee;
|
|
||||||
using CompanyManagment.App.Contracts.Workshop;
|
|
||||||
using CompanyManagment.App.Contracts.YearlySalary;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
||||||
|
|
||||||
namespace ServiceHost.Areas.Client.Pages.Company.Employees;
|
|
||||||
|
|
||||||
public class EmployeePaymentModel : PageModel
|
|
||||||
{
|
|
||||||
private readonly IAuthHelper _authHelper;
|
|
||||||
private readonly IEmployeeApplication _employeeApplication;
|
|
||||||
private readonly IPaymentToEmployeeApplication _paymentToEmployeeApplication;
|
|
||||||
|
|
||||||
private readonly IWorkshopApplication _workshopApplication;
|
|
||||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
|
||||||
public CreatePaymentToEmployee Command;
|
|
||||||
public string EmployeeFullName;
|
|
||||||
public long EmployeeId;
|
|
||||||
public string Month;
|
|
||||||
public List<PaymentToEmployeeViewModel> PaymentToEmployeeSearch;
|
|
||||||
public PaymentToEmployeeSearchModel SearchModel;
|
|
||||||
|
|
||||||
public string WorkshopFullName;
|
|
||||||
public long WorkshopId;
|
|
||||||
public string Year;
|
|
||||||
public List<string> YearlyList;
|
|
||||||
|
|
||||||
public EmployeePaymentModel(IWorkshopApplication workshopApplication, IEmployeeApplication employeeApplication,
|
|
||||||
IYearlySalaryApplication yearlySalaryApplication, IAuthHelper authHelper,
|
|
||||||
IPaymentToEmployeeApplication paymentToEmployeeApplication)
|
|
||||||
{
|
|
||||||
_workshopApplication = workshopApplication;
|
|
||||||
_employeeApplication = employeeApplication;
|
|
||||||
_yearlySalaryApplication = yearlySalaryApplication;
|
|
||||||
_authHelper = authHelper;
|
|
||||||
_paymentToEmployeeApplication = paymentToEmployeeApplication; // dependency injection
|
|
||||||
}
|
|
||||||
|
|
||||||
public void OnGet(long workshopId, long employeeId, PaymentToEmployeeSearchModel searchModel)
|
|
||||||
{
|
|
||||||
var workshop = _workshopApplication.GetDetails(workshopId);
|
|
||||||
var employee = _employeeApplication.GetDetails(employeeId);
|
|
||||||
|
|
||||||
var search = new PaymentToEmployeeSearchModel
|
|
||||||
{
|
|
||||||
EmployeeId = employeeId,
|
|
||||||
WorkshopId = workshopId,
|
|
||||||
Year = searchModel.Year,
|
|
||||||
Month = searchModel.Month
|
|
||||||
};
|
|
||||||
|
|
||||||
PaymentToEmployeeSearch = _paymentToEmployeeApplication.searchClient(search);
|
|
||||||
|
|
||||||
WorkshopFullName = workshop.WorkshopFullName;
|
|
||||||
EmployeeFullName = employee.EmployeeFullName;
|
|
||||||
WorkshopId = workshopId;
|
|
||||||
EmployeeId = employeeId;
|
|
||||||
YearlyList = _yearlySalaryApplication.GetYears();
|
|
||||||
|
|
||||||
var command = new CreatePaymentToEmployee
|
|
||||||
{
|
|
||||||
EmployeeId = employeeId,
|
|
||||||
WorkshopId = workshopId
|
|
||||||
};
|
|
||||||
Command = command;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IActionResult OnPostPaymentToPersonnelSave(CreatePaymentToEmployee command)
|
|
||||||
{
|
|
||||||
var payDateFa = command.CreatePaymentToEmployeeItem.PayDateFa;
|
|
||||||
command.Year = payDateFa.Substring(0, 4);
|
|
||||||
command.Month = payDateFa.Substring(5, 2);
|
|
||||||
|
|
||||||
var result = _paymentToEmployeeApplication.Create(command);
|
|
||||||
|
|
||||||
return new JsonResult(new
|
|
||||||
{
|
|
||||||
result.IsSuccedded,
|
|
||||||
message = result.Message
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,501 +0,0 @@
|
|||||||
@model CompanyManagment.App.Contracts.Leave.CreateLeave
|
|
||||||
@{
|
|
||||||
|
|
||||||
int i = 1;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@{
|
|
||||||
<style>
|
|
||||||
#paidLeave .panel-title {
|
|
||||||
font-size: 14px;
|
|
||||||
margin-bottom: 0;
|
|
||||||
margin-top: 0;
|
|
||||||
padding: 5px 7px 5px 7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-body {
|
|
||||||
top: 2.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-dialog {
|
|
||||||
width: 30%;
|
|
||||||
margin: 30px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal .modal-dialog .modal-content {
|
|
||||||
min-height: auto;
|
|
||||||
height: auto !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-footer {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-footer .btn + .btn {
|
|
||||||
margin-bottom: 0;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@media (max-width: 1580px) {
|
|
||||||
.modal-dialog {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@media (max-width: 768px) {
|
|
||||||
.modal-dialog {
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#paidLeave .panel-heading {
|
|
||||||
border-radius: 17px;
|
|
||||||
border-bottom-right-radius: 0;
|
|
||||||
border-bottom-left-radius: 0;
|
|
||||||
border: none !important;
|
|
||||||
padding: 0px 20px;
|
|
||||||
background-color: #505050 !important;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#paidLeave .form-control {
|
|
||||||
border: 1px solid #ababab;
|
|
||||||
}
|
|
||||||
|
|
||||||
#paidLeave .panel .panel-body {
|
|
||||||
padding: 0;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.modal-content .panel {
|
|
||||||
border-radius: 17px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
}
|
|
||||||
<div class="container" id="paidLeave">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
|
|
||||||
<form asp-page="./Index" asp-page-handler="CreatePaidLeave" autocomplete="off"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true"
|
|
||||||
data-callback=""
|
|
||||||
data-action="ReloadPaidLeave">
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
|
|
||||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 150px; text-align: center;"> مرخصی استحقاقی </legend>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<fieldset style="border: 1px solid #c3c3c3; background-color: #ddd; border-radius: 10px; padding: 5px 0 5px 0; margin-bottom: 10px; ">
|
|
||||||
<div class="flexible-div">
|
|
||||||
<div class="col-md-4" style="margin-top: 3px">
|
|
||||||
نوع مرخصی <span style="color: red">*</span>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
روزانه <input type="radio" checked="checked" value="روزانه" asp-for="PaidLeaveType">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
ساعتی <input type="radio" value="ساعتی" asp-for="PaidLeaveType">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<span asp-validation-for="PaidLeaveType" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row m-t-10 flexible-div">
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
|
||||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" onchange="validDate(this);" asp-for="StartLeave" />
|
|
||||||
|
|
||||||
<span asp-validation-for="StartLeave" class="error"></span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-5">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
|
||||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" onchange="validDate(this);" asp-for="EndLeave" />
|
|
||||||
|
|
||||||
<span asp-validation-for="EndLeave" class="error"></span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="LeaveHourses" class="control-label m-r-5">ساعت</label>
|
|
||||||
<input id="hours" dir="ltr" maxlength="2" style="text-align: center" class="form-control" asp-for="LeaveHourses" />
|
|
||||||
|
|
||||||
<span asp-validation-for="LeaveHourses" class="error"></span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="m-t-10">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> سوابق مرخصی استحقاقی </h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div class="row">
|
|
||||||
<div id="data-PaidLeave" class="col-sm-12 col-sm-12 col-xs-12">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light" data-dismiss="modal">بستن</button>
|
|
||||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light" style="background: #0f9500;border: #0f9500;">ذخیره</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
<form asp-page="./Index" asp-page-handler="RemovePaidLeave" autocomplete="off" id="sub"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true"
|
|
||||||
data-callback=""
|
|
||||||
data-action="ReloadPaidLeave">
|
|
||||||
<div style="display: none">
|
|
||||||
<input type="hidden" id="LeftId" name="id" />
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
|
||||||
@*<input type="hidden" asp-for="id" value="id"/>*@
|
|
||||||
<div class="modal-footer" style="margin-bottom: 10px">
|
|
||||||
<input type="submit" id="sendFinaly" form="sub" value="fine" name="fine" style="display: none" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
|
||||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
reloadPaidLeaveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
function reloadPaidLeaveList(){
|
|
||||||
|
|
||||||
$("#data-PaidLeave").html('');
|
|
||||||
$("#data-PaidLeave").html('<div class="ring"> منتظر بمانید<span></span></div>');
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Page("/Company/Employees/Index", "PaidLeave")',
|
|
||||||
data:{"employeeId":@Model.EmployeeId,"workshopId_":@Model.WorkshopId },
|
|
||||||
type: "Get",
|
|
||||||
dataType: 'html',
|
|
||||||
success: function(data) {
|
|
||||||
$('#data-PaidLeave').html(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#hours").attr("disabled", "disabled");
|
|
||||||
$('input:radio[name="PaidLeaveType"]').change(
|
|
||||||
function () {
|
|
||||||
if ($(this).is(':checked') && $(this).val() == 'روزانه') {
|
|
||||||
|
|
||||||
$("#hours").val('');
|
|
||||||
$("#hours").attr("disabled", "disabled");
|
|
||||||
$("#endLeave").removeAttr("disabled");
|
|
||||||
} else if ($(this).is(':checked') && $(this).val() == 'ساعتی') {
|
|
||||||
|
|
||||||
$("#endLeave").val('');
|
|
||||||
$("#endLeave").attr("disabled", "disabled");
|
|
||||||
$("#hours").removeAttr("disabled");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script>
|
|
||||||
$('.RemoveLeftWork').on("click",
|
|
||||||
function () {
|
|
||||||
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
|
||||||
$('#LeftId').val(id);
|
|
||||||
swal({
|
|
||||||
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
|
||||||
text: "",
|
|
||||||
type: "warning",
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonColor: "#DD6B55",
|
|
||||||
confirmButtonText: "بله",
|
|
||||||
cancelButtonText: "خیر",
|
|
||||||
closeOnConfirm: true,
|
|
||||||
closeOnCancel: true
|
|
||||||
}, function (isConfirm) {
|
|
||||||
if (isConfirm) {
|
|
||||||
|
|
||||||
$('#sendFinaly').click();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(".persianDateInput").on('keyup', function () {
|
|
||||||
if (event.which !== 8 && event.which !== 46) {
|
|
||||||
let value = $(this).val();
|
|
||||||
let lengthValue = value.length;
|
|
||||||
if (lengthValue === 4) {
|
|
||||||
value += '/'
|
|
||||||
}
|
|
||||||
if (lengthValue === 7) {
|
|
||||||
value += '/'
|
|
||||||
}
|
|
||||||
$(this).val(value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(".persianDateInput").on('blur', function () {
|
|
||||||
let value = $(this).val();
|
|
||||||
let lengthValue = value.length;
|
|
||||||
if (!dateValidCheck(this)) {
|
|
||||||
$(this).addClass("errored");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$(this).removeClass("errored");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function checkEnValid(fixDate1) {
|
|
||||||
|
|
||||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = fixDate1;
|
|
||||||
|
|
||||||
let m1, m2;
|
|
||||||
let y1, y2, y3, y4;
|
|
||||||
let d1, d2;
|
|
||||||
for (let i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let yRes = y1 + y2 + y3 + y4;
|
|
||||||
let year = parseInt(yRes);
|
|
||||||
let mRes = m1 + m2;
|
|
||||||
let month = parseInt(mRes);
|
|
||||||
let dRes = d1 + d2;
|
|
||||||
let day = parseInt(dRes);
|
|
||||||
let kabiseh = false;
|
|
||||||
if (month <= 6 && day > 31) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (month > 6 && month < 12 && day > 30) {
|
|
||||||
return false;
|
|
||||||
} else if (month === 12) {
|
|
||||||
|
|
||||||
switch (year) {
|
|
||||||
case 1346:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1350:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1354:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1358:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1362:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1366:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1370:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1375:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1379:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1383:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1387:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1391:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1395:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1399:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1403:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1408:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1412:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1416:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1420:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1424:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1428:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1432:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1436:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1441:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1445:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
kabiseh = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (kabiseh == true && day > 30) {
|
|
||||||
return false;
|
|
||||||
} else if (kabiseh == false && day > 29) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
function dateValidcheck(inputField1) {
|
|
||||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = inputField1.value;
|
|
||||||
|
|
||||||
let m1, m2;
|
|
||||||
let y1, y2, y3, y4;
|
|
||||||
let d1, d2;
|
|
||||||
let s1, s2;
|
|
||||||
for (var i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 4) {
|
|
||||||
s1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 7) {
|
|
||||||
s2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let yRes = y1 + y2 + y3 + y4;
|
|
||||||
let year = parseInt(yRes);
|
|
||||||
let mRes = m1 + m2;
|
|
||||||
let month = parseInt(mRes);
|
|
||||||
let dRes = d1 + d2;
|
|
||||||
let day = parseInt(dRes);
|
|
||||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
|
||||||
let test1 = checkEnValid(inputField1.value);
|
|
||||||
|
|
||||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
|
||||||
|
|
||||||
|
|
||||||
if (isValid && test1) {
|
|
||||||
//inputField1.addClass("errored");
|
|
||||||
inputField1.style.boxShadow = 'none';
|
|
||||||
inputField1.style.border = '1px solid #c7c7c7';
|
|
||||||
start1valid = true;
|
|
||||||
} else {
|
|
||||||
if (inputField1.value != "") {
|
|
||||||
//inputField1.addClass("errored");
|
|
||||||
inputField1.style.boxShadow = 'inset 0 0 2px #eb3434, 0 0 5px #eb3434';
|
|
||||||
inputField1.style.border = '1px solid #eb3434';
|
|
||||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
|
||||||
start1valid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return start1valid;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,92 +0,0 @@
|
|||||||
@model List<CompanyManagment.App.Contracts.Leave.LeaveViewModel>
|
|
||||||
@{
|
|
||||||
int i = 1;
|
|
||||||
}
|
|
||||||
<table id="datatable" class="table table-striped table-bordered">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="font-size: 12px !important;text-align: center">#</th>
|
|
||||||
<th style="font-size: 12px !important; text-align: center"> تاریخ شروع</th>
|
|
||||||
<th style="font-size: 12px !important; text-align: center"> تاریخ پایان </th>
|
|
||||||
<th style="font-size: 12px !important; text-align: center"> نوع مدت مرخصی </th>
|
|
||||||
<th style="font-size: 12px !important; text-align: center"> مدت زمان<span>(ساعت)</span> </th>
|
|
||||||
<th style="font-size: 12px !important; width: 20%; text-align: center">عملیات</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach (var item in Model)
|
|
||||||
{
|
|
||||||
<tr>
|
|
||||||
<td style="font-size: 12px !important; text-align: center">@i </td>
|
|
||||||
<td style="font-family: 'IranText' !important; font-size: 12px !important; text-align: center">@item.StartLeave </td>
|
|
||||||
<td style="font-family: 'IranText' !important; font-size: 12px !important; text-align: center">
|
|
||||||
@item.EndLeave
|
|
||||||
</td>
|
|
||||||
<td style="font-size: 12px !important; text-align: center">
|
|
||||||
@item.PaidLeaveType
|
|
||||||
</td>
|
|
||||||
<td style="font-family: 'IranText' !important; font-size: 12px !important; text-align: center">
|
|
||||||
@item.LeaveHourses
|
|
||||||
</td>
|
|
||||||
@{
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
<td>
|
|
||||||
<a class="btn btn-warning pull-right m-rl-5 rad"
|
|
||||||
href="#showmodal=@Url.Page("/Company/Employees/Index", "EditPaidLeave", new { Id = item.Id })">
|
|
||||||
<i class="fa faSize fa-edit"></i>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="btn btn-danger pull-right m-rl-5 fff rad RemoveLeftWork"><i class="fa faSize fa-trash"></i></a>
|
|
||||||
<div style="display: none">
|
|
||||||
<input type="hidden" name="LeftworkId" value="@item.Id" />
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$('.RemoveLeftWork').on("click",
|
|
||||||
function () {
|
|
||||||
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
|
||||||
$('#LeftId').val(id);
|
|
||||||
swal({
|
|
||||||
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
|
||||||
text: "",
|
|
||||||
type: "warning",
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonColor: "#DD6B55",
|
|
||||||
confirmButtonText: "بله",
|
|
||||||
cancelButtonText: "خیر",
|
|
||||||
closeOnConfirm: true,
|
|
||||||
closeOnCancel: true
|
|
||||||
}, function (isConfirm) {
|
|
||||||
if (isConfirm) {
|
|
||||||
|
|
||||||
$('#RemoveForm').submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$('#RemoveForm').submit(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: $(this).attr( 'action' ),
|
|
||||||
data: $(this).serialize(),
|
|
||||||
success: function (response) {
|
|
||||||
if (response.isSuccedded == true) {
|
|
||||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
|
||||||
reloadSickLeaveList();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,473 +0,0 @@
|
|||||||
@model CompanyManagment.App.Contracts.Leave.CreateLeave
|
|
||||||
@{
|
|
||||||
int i = 1;
|
|
||||||
}
|
|
||||||
@{
|
|
||||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
|
||||||
}
|
|
||||||
|
|
||||||
<link href="@Href("~/Clienttheme/css/sickLeave.css")" rel="stylesheet" />
|
|
||||||
|
|
||||||
<div class="container" id="sickLeave">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
||||||
</div>
|
|
||||||
<form id="CreateForm" asp-page="./Index" asp-page-handler="CreateSickLeave" autocomplete="off" class="sickLeave"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true"
|
|
||||||
data-callback=""
|
|
||||||
data-action="ReloadSickLeaveForClient">
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<fieldset style="border: 1px solid #999797; border-radius: 17px; padding: revert">
|
|
||||||
<legend style="margin-bottom: 5px; font-size: 16px; color: #505458; width: 150px; text-align: center;"> مرخصی استعلاجی </legend>
|
|
||||||
<div class="row m-t-10 m-b-10 d-flex">
|
|
||||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
|
||||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="StartLeave" />
|
|
||||||
<span asp-validation-for="StartLeave" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
|
||||||
<div class="m-b-0" dir="rtl">
|
|
||||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
|
||||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="EndLeave" />
|
|
||||||
<span asp-validation-for="EndLeave" class="error"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
<div id="data-SickLeave" class="row" style="margin-top: 20px;">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
|
||||||
<div class="modal-footer">
|
|
||||||
<a class="btn btn-default btn-rounded waves-effect waves-light" data-dismiss="modal" id="close">بستن</a>
|
|
||||||
<a onclick="createSickLeave()" class="btn btn-success btn-rounded waves-effect waves-light" style="background: #0f9500;border: #0f9500;">ذخیره</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form id="RemoveForm" asp-page="./Index" asp-page-handler="RemoveSickLeave" autocomplete="off"
|
|
||||||
method="post"
|
|
||||||
data-ajax="true"
|
|
||||||
data-callback="">
|
|
||||||
<div style="display: none">
|
|
||||||
<input type="hidden" id="LeftId" name="id" />
|
|
||||||
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
|
|
||||||
<div class="modal-footer" style="margin-bottom: 10px">
|
|
||||||
@*<input type="submit" id="sendFinaly" form="sub" value="fine" name="fine" style="display: none" />*@
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
@* <form id="SickListForm" asp-page="./Index" autocomplete="off"
|
|
||||||
method="get"
|
|
||||||
data-ajax="true"
|
|
||||||
data-ajax-method="get"
|
|
||||||
data-ajax-url="@Url.Page("./Index","SickList")" >
|
|
||||||
<div style="display: none">
|
|
||||||
<input type="hidden" asp-for="EmployeeId" />
|
|
||||||
<input type="hidden" asp-for="WorkshopId" />
|
|
||||||
</div>
|
|
||||||
</form>*@
|
|
||||||
</div>
|
|
||||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
|
||||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(document).ready(function () {
|
|
||||||
reloadSickLeaveList();
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on("click", function (event) {
|
|
||||||
var target = $(event.target);
|
|
||||||
if (!target.is("#sickLeave")
|
|
||||||
&& !target.is("#sickLeave *")
|
|
||||||
) {
|
|
||||||
$(".datepicker-container").hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$("#close , .close").on('click', function () {
|
|
||||||
$(".datepicker-container").hide();
|
|
||||||
});
|
|
||||||
function reloadSickLeaveList(){
|
|
||||||
|
|
||||||
$("#data-SickLeave").html('');
|
|
||||||
$("#data-SickLeave").html('<div class="ring"> منتظر بمانید<span></span></div>');
|
|
||||||
$.ajax({
|
|
||||||
url: '@Url.Page("/Company/Employees/Index", "SickList")',
|
|
||||||
data:{"employeeId":@Model.EmployeeId,"workshopId_":@Model.WorkshopId },
|
|
||||||
type: "Get",
|
|
||||||
dataType: 'html',
|
|
||||||
success: function(data) {
|
|
||||||
$('#data-SickLeave').html(data);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function convertDate(dateVal) {
|
|
||||||
let dateParts = dateVal.split("/");
|
|
||||||
var formattedDateString = dateParts[0] + "-" + dateParts[1] + "-" + dateParts[2];
|
|
||||||
var value = new Date(formattedDateString);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
function createSickLeave(){
|
|
||||||
$("#CreateForm").find('.persianDateInput').each(function () {
|
|
||||||
if ($(this).val() === '') {
|
|
||||||
$(this).addClass('errored');
|
|
||||||
} else {
|
|
||||||
$(this).removeClass('errored');
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let table = $("#CreateForm").find('#datatable');
|
|
||||||
table.find("tbody tr").each(function () {
|
|
||||||
let row = $(this);
|
|
||||||
let rowStartDate = row.find('td:eq(1)').text();
|
|
||||||
let rowEndDate = row.find('td:eq(2)').text();
|
|
||||||
let date1 = $('#startLeave').val();
|
|
||||||
let date2 = $('#endLeave').val();
|
|
||||||
|
|
||||||
let rowStartDateVal = convertDate(rowStartDate);
|
|
||||||
let rowEndDateVal = convertDate(rowEndDate);
|
|
||||||
let date1Val = convertDate(date1);
|
|
||||||
let date2Val = convertDate(date2);
|
|
||||||
|
|
||||||
const $existingDate1 = row.find('td:eq(1):contains("' + date1 + '")');
|
|
||||||
if (date1Val != '' && $existingDate1.length > 0) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ شروع در ردیف ' + row.find('td:eq(0)').text() + ' وارد شده است.');
|
|
||||||
$('#startLeave').addClass("errored");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const $existingDate2 = row.find('td:eq(2):contains("' + date2 + '")');
|
|
||||||
if ($existingDate2.length > 0) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ پایان در ردیف ' + row.find('td:eq(0)').text() + ' وارد شده است.');
|
|
||||||
$('#endLeave').addClass("errored");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const $existingDate3 = row.find('td:eq(2):contains("' + date1 + '")');
|
|
||||||
if ($existingDate3.length > 0) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ شروع با تاریخ پایان در ردیف ' + row.find('td:eq(0)').text() + ' برابر است.');
|
|
||||||
$('#endDate1').addClass("errored");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const $existingDate4 = row.find('td:eq(1):contains("' + date2 + '")');
|
|
||||||
if ($existingDate4.length > 0) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ پایان با تاریخ شروع در ردیف ' + row.find('td:eq(0)').text() + ' برابر است.');
|
|
||||||
$('#endLeave').addClass("errored");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (date1Val < rowStartDateVal && rowStartDateVal < date2Val && date1Val < rowEndDateVal && rowEndDateVal < date2Val) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
|
||||||
$('#endLeave').addClass("errored");
|
|
||||||
$('#startLeave').addClass("errored");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (date1Val > rowStartDateVal && date1Val < rowEndDateVal && date2Val > rowStartDateVal && date2Val < rowEndDateVal) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
|
||||||
$('#endLeave').addClass("errored");
|
|
||||||
$('#startLeave').addClass("errored");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (date1Val < rowStartDateVal && date2Val > rowStartDateVal && date2Val < rowEndDateVal) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
|
||||||
$('#endLeave').addClass("errored");
|
|
||||||
$('#startLeave').addClass("errored");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (date1Val > rowStartDateVal && date1Val < rowEndDateVal && date2Val > rowEndDateVal) {
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
|
||||||
$('#endLeave').addClass("errored");
|
|
||||||
$('#startLeave').addClass("errored");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($('#CreateForm .errored').length == 0)
|
|
||||||
{
|
|
||||||
$("#CreateForm").submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$('#CreateForm').submit(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: $(this).attr( 'action' ),
|
|
||||||
data: $(this).serialize(),
|
|
||||||
success: function (response) {
|
|
||||||
if (response.isSuccedded == true) {
|
|
||||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
|
||||||
reloadSickLeaveList();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$(".persianDateInput").on('keyup', function () {
|
|
||||||
if (event.which !== 8 && event.which !== 46) {
|
|
||||||
let value = $(this).val();
|
|
||||||
let lengthValue = value.length;
|
|
||||||
if (lengthValue === 4) {
|
|
||||||
value += '/'
|
|
||||||
}
|
|
||||||
if (lengthValue === 7) {
|
|
||||||
value += '/'
|
|
||||||
}
|
|
||||||
$(this).val(value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$(".persianDateInput").on('blur', function () {
|
|
||||||
let value = $(this).val();
|
|
||||||
let lengthValue = value.length;
|
|
||||||
if (!dateValidCheck(this)) {
|
|
||||||
$(this).addClass("errored");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$(this).removeClass("errored");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function checkEnValid(fixDate1) {
|
|
||||||
|
|
||||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = fixDate1;
|
|
||||||
|
|
||||||
let m1, m2;
|
|
||||||
let y1, y2, y3, y4;
|
|
||||||
let d1, d2;
|
|
||||||
for (let i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let yRes = y1 + y2 + y3 + y4;
|
|
||||||
let year = parseInt(yRes);
|
|
||||||
let mRes = m1 + m2;
|
|
||||||
let month = parseInt(mRes);
|
|
||||||
let dRes = d1 + d2;
|
|
||||||
let day = parseInt(dRes);
|
|
||||||
let kabiseh = false;
|
|
||||||
if (month <= 6 && day > 31) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (month > 6 && month < 12 && day > 30) {
|
|
||||||
return false;
|
|
||||||
} else if (month === 12) {
|
|
||||||
|
|
||||||
switch (year) {
|
|
||||||
case 1346:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1350:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1354:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1358:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1362:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1366:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1370:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1375:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1379:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1383:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1387:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1391:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1395:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1399:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1403:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1408:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1412:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1416:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1420:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1424:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1428:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1432:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1436:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1441:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
case 1445:
|
|
||||||
kabiseh = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
kabiseh = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (kabiseh == true && day > 30) {
|
|
||||||
return false;
|
|
||||||
} else if (kabiseh == false && day > 29) {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
function dateValidcheck(inputField1) {
|
|
||||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
|
||||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
|
||||||
fixNumbers = function (str) {
|
|
||||||
if (typeof str === 'string') {
|
|
||||||
for (var i = 0; i < 10; i++) {
|
|
||||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
let getdate = inputField1.value;
|
|
||||||
|
|
||||||
let m1, m2;
|
|
||||||
let y1, y2, y3, y4;
|
|
||||||
let d1, d2;
|
|
||||||
let s1, s2;
|
|
||||||
for (var i = 0; i < getdate.length; i++) {
|
|
||||||
if (i === 0) {
|
|
||||||
y1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 1) {
|
|
||||||
y2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 2) {
|
|
||||||
y3 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 3) {
|
|
||||||
y4 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 4) {
|
|
||||||
s1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 5) {
|
|
||||||
m1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 6) {
|
|
||||||
m2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 7) {
|
|
||||||
s2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 8) {
|
|
||||||
d1 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
if (i === 9) {
|
|
||||||
d2 = fixNumbers(getdate[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
let yRes = y1 + y2 + y3 + y4;
|
|
||||||
let year = parseInt(yRes);
|
|
||||||
let mRes = m1 + m2;
|
|
||||||
let month = parseInt(mRes);
|
|
||||||
let dRes = d1 + d2;
|
|
||||||
let day = parseInt(dRes);
|
|
||||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
|
||||||
let test1 = checkEnValid(inputField1.value);
|
|
||||||
|
|
||||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
|
||||||
|
|
||||||
|
|
||||||
if (isValid && test1) {
|
|
||||||
//inputField1.addClass("errored");
|
|
||||||
inputField1.style.boxShadow = 'none';
|
|
||||||
inputField1.style.border = '1px solid #c7c7c7';
|
|
||||||
start1valid = true;
|
|
||||||
} else {
|
|
||||||
if (inputField1.value != "") {
|
|
||||||
//inputField1.addClass("errored");
|
|
||||||
inputField1.style.boxShadow = 'inset 0 0 2px #eb3434, 0 0 5px #eb3434';
|
|
||||||
inputField1.style.border = '1px solid #eb3434';
|
|
||||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
|
||||||
start1valid = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return start1valid;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@@ -1,97 +0,0 @@
|
|||||||
@model List<CompanyManagment.App.Contracts.Leave.LeaveViewModel>
|
|
||||||
@{
|
|
||||||
int i = 1;
|
|
||||||
}
|
|
||||||
<div class="m-t-10">
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-heading">
|
|
||||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> سوابق مرخصی استعلاجی </h3>
|
|
||||||
</div>
|
|
||||||
<div class="panel-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-sm-12 col-sm-12 col-xs-12 table-container ">
|
|
||||||
<table id="datatable" class="table table-striped table-bordered">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th style="font-size: 12px !important;text-align: center">#</th>
|
|
||||||
<th style="font-size: 12px !important; text-align: center"> تاریخ شروع</th>
|
|
||||||
<th style="font-size: 12px !important; text-align: center"> تاریخ پایان </th>
|
|
||||||
<th style="font-size: 12px !important; width: 25%; text-align: center">عملیات</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach (var item in Model)
|
|
||||||
{
|
|
||||||
<tr>
|
|
||||||
<td style="font-size: 12px !important; text-align: center">@i </td>
|
|
||||||
<td style="font-size: 12px !important; text-align: center">@item.StartLeave </td>
|
|
||||||
<td style="font-size: 12px !important; text-align: center">
|
|
||||||
@item.EndLeave
|
|
||||||
</td>
|
|
||||||
@{
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
<td class="operationBtns">
|
|
||||||
<a class="btn btn-warning pull-right m-rl-5 rad"
|
|
||||||
href="#showmodal=@Url.Page("/Company/Employees/Index", "EditSickLeave", new { Id = item.Id })">
|
|
||||||
<i class="fa faSize fa-edit"></i>
|
|
||||||
</a>
|
|
||||||
<a href="#" class="btn btn-danger pull-right m-rl-5 fff rad RemoveLeftWork"><i class="fa faSize fa-trash"></i></a>
|
|
||||||
<div style="display: none">
|
|
||||||
<input type="hidden" name="LeftworkId" value="@item.Id" />
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
$('.RemoveLeftWork').on("click",
|
|
||||||
function () {
|
|
||||||
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
|
||||||
$('#LeftId').val(id);
|
|
||||||
swal({
|
|
||||||
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
|
||||||
text: "",
|
|
||||||
type: "warning",
|
|
||||||
showCancelButton: true,
|
|
||||||
confirmButtonColor: "#DD6B55",
|
|
||||||
confirmButtonText: "بله",
|
|
||||||
cancelButtonText: "خیر",
|
|
||||||
closeOnConfirm: true,
|
|
||||||
closeOnCancel: true
|
|
||||||
}, function (isConfirm) {
|
|
||||||
if (isConfirm) {
|
|
||||||
|
|
||||||
$('#RemoveForm').submit();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
$('#RemoveForm').submit(function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopImmediatePropagation();
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: $(this).attr( 'action' ),
|
|
||||||
data: $(this).serialize(),
|
|
||||||
success: function (response) {
|
|
||||||
if (response.isSuccedded == true) {
|
|
||||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
|
||||||
reloadSickLeaveList();
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -1,138 +0,0 @@
|
|||||||
@model CompanyManagment.App.Contracts.Checkout.CreateCheckout
|
|
||||||
@{
|
|
||||||
|
|
||||||
int i = 1;
|
|
||||||
int b = 0;
|
|
||||||
}
|
|
||||||
@if (Model.Contracts != null)
|
|
||||||
{
|
|
||||||
@foreach (var item in Model.Contracts)
|
|
||||||
{
|
|
||||||
<tr class="contractList">
|
|
||||||
@if (item.RedColor)
|
|
||||||
{
|
|
||||||
<input type="hidden" name="redColor" />
|
|
||||||
}
|
|
||||||
@if (item.MoreThanOneMonth && item.Waiting == false)
|
|
||||||
{
|
|
||||||
<input type="hidden" value="@item.EmployeeName" name="MoreThanOneMonth" />
|
|
||||||
}
|
|
||||||
else if (item.Waiting && item.MoreThanOneMonth == false)
|
|
||||||
{
|
|
||||||
<input type="hidden" value="@item.EmployeeName" name="Waiting" />
|
|
||||||
}
|
|
||||||
else if (item.Waiting && item.MoreThanOneMonth)
|
|
||||||
{
|
|
||||||
<input type="hidden" value="@item.EmployeeName" name="MixWatingAndMore" />
|
|
||||||
}
|
|
||||||
|
|
||||||
<td class="@(i==Model.Contracts.Count?"last-row-first-child":"")" style="font-size: 12px !important; text-align: center;">
|
|
||||||
@i
|
|
||||||
</td>
|
|
||||||
<td style="font-size: 12px !important; text-align: center;">
|
|
||||||
|
|
||||||
@if (item.Extension)
|
|
||||||
{
|
|
||||||
|
|
||||||
<input type="checkbox" class="chekedId" name="cheking" value="@item.EmployeeId" />
|
|
||||||
b++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@if (item.RedColor)
|
|
||||||
{
|
|
||||||
<input type="checkbox" value="@item.EmployeeId" disabled="disabled" />
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<input type="checkbox" name="cheking" value="@item.EmployeeId" />
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
<td style="font-size: 12px !important; text-align: center;">
|
|
||||||
<input type="text" class="pCode form-control" disabled="disabled" name="@item.EmployeeId" value="@item.PersonnelCode" />
|
|
||||||
</td>
|
|
||||||
<td class="@(i==Model.Contracts.Count?"last-row-last-child":"")" style="font-size: 12px !important; text-align: center;">
|
|
||||||
@item.EmployeeName
|
|
||||||
</td>
|
|
||||||
@{
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
//var redCheck = $('.redColor').val();
|
|
||||||
//if (redCheck == true) {
|
|
||||||
// console.log("ok");
|
|
||||||
// $('.redColor').closest('tr').css("background", "red");
|
|
||||||
//}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
$('.chekedId').on('change', function () {
|
|
||||||
let pname = this.value;
|
|
||||||
let inputElement = document.querySelector('input[name="' + pname + '"]');
|
|
||||||
if (this.checked) {
|
|
||||||
|
|
||||||
inputElement.disabled = false;
|
|
||||||
inputElement.style.backgroundColor = '#fff';
|
|
||||||
|
|
||||||
} else {
|
|
||||||
inputElement.disabled = true;
|
|
||||||
inputElement.style.backgroundColor = '#e9e9e9';
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
var checkboxes = document.getElementsByName('redColor');
|
|
||||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
|
||||||
checkboxes[i].parentNode.style.background = "rgb(248 251 196)";
|
|
||||||
}
|
|
||||||
var checkboxes = document.getElementsByName('Waiting');
|
|
||||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
|
||||||
checkboxes[i].parentNode.style.background = "#ffcd40";
|
|
||||||
}
|
|
||||||
var checkboxes = document.getElementsByName('MoreThanOneMonth');
|
|
||||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
|
||||||
checkboxes[i].parentNode.style.background = "#daf9ca";
|
|
||||||
}
|
|
||||||
var checkboxes = document.getElementsByName('MixWatingAndMore');
|
|
||||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
|
||||||
checkboxes[i].parentNode.style.background = "#ffcd40";
|
|
||||||
}
|
|
||||||
var checkboxes2 = document.getElementsByName('MixWatingAndMore');
|
|
||||||
//for (var s = 0, m = checkboxes2.length; s < m; s++) {
|
|
||||||
// $('#alarm').append(
|
|
||||||
|
|
||||||
// '<h5 style="color:red; direction: rtl;" class="ConvertErr"><span> مدت قرارد </span> <span> </span><span>' + checkboxes2[s].value + '</span> <span> </span><span> بیش از یک ماه است</span></h5>'
|
|
||||||
// + '<h5 style="color: #ffa12c; direction: rtl;" class="ConvertErr"><span> از آخرین قرارداد </span> <span> </span><span>' + checkboxes2[s].value + '</span> <span> </span><span> تا تاریخ تبدیل انتخاب شده هیچ قراردادی وجود ندارد</span></h5>'
|
|
||||||
// );
|
|
||||||
//}
|
|
||||||
//var checkboxes2 = document.getElementsByName('MoreThanOneMonth');
|
|
||||||
//for (var b = 0, m = checkboxes2.length; b < m; b++) {
|
|
||||||
// $('#alarm').append(
|
|
||||||
|
|
||||||
// '<h5 style="color:red; direction: rtl;" class="ConvertErr"><span> مدت قرارد </span> <span> </span><span>' + checkboxes2[b].value + '</span> <span> </span><span> بیش از یک ماه است</span></h5>'
|
|
||||||
|
|
||||||
// );
|
|
||||||
//}
|
|
||||||
|
|
||||||
//var checkboxes3 = document.getElementsByName('Waiting');
|
|
||||||
//for (var a = 0, f = checkboxes3.length; a < f; a++) {
|
|
||||||
// $('#alarm').append(
|
|
||||||
|
|
||||||
// '<h5 style="color: #ffa12c; direction: rtl;" class="ConvertErr"><span> از آخرین قرارداد </span> <span> </span><span>' + checkboxes3[a].value + '</span> <span> </span><span> تا تاریخ تبدیل انتخاب شده هیچ قراردادی وجود ندارد</span></h5>'
|
|
||||||
|
|
||||||
// );
|
|
||||||
//}
|
|
||||||
/*ff8f8d*/
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,534 +1,30 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
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 System.Security.Claims;
|
||||||
using _0_Framework.Application.UID;
|
using _0_Framework.Application;
|
||||||
using AccountManagement.Application.Contracts.CameraAccount;
|
using AccountManagement.Application.Contracts.Account;
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
namespace ServiceHost.Pages
|
namespace ServiceHost.Pages
|
||||||
{
|
{
|
||||||
public class IndexModel : PageModel
|
public class IndexModel : PageModel
|
||||||
{
|
{
|
||||||
|
private readonly IAuthHelper _authHelper;
|
||||||
|
private readonly IAccountApplication _accountApplication;
|
||||||
|
|
||||||
public string Mess { get; set; }
|
public IndexModel(IAuthHelper authHelper, IAccountApplication accountApplication)
|
||||||
[BindProperty]
|
{
|
||||||
public string Username { get; set; }
|
_authHelper = authHelper;
|
||||||
[BindProperty]
|
_accountApplication = accountApplication;
|
||||||
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 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
|
public IActionResult OnGetLogout()
|
||||||
// _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)
|
|
||||||
{
|
{
|
||||||
|
_accountApplication.Logout();
|
||||||
bool captchaResult = true;
|
return RedirectToPage("/Index");
|
||||||
//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; }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
339
ServiceHost/Pages/Register/Index.cshtml
Normal file
131
ServiceHost/Pages/Register/Index.cshtml.cs
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
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")
|
||||||
|
{
|
||||||
|
var result = await _temporaryClientRegistrationApplication.GetTotalPaymentAndWorkshopList(contractingPartyTempId, periodModel, paymentModel);
|
||||||
|
return new JsonResult(new
|
||||||
|
{
|
||||||
|
data = result,
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IActionResult> OnPostCreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax)
|
||||||
|
{
|
||||||
|
var result = await _temporaryClientRegistrationApplication.CreateOrUpdateInstitutionContractTemp(contractingPartyTempId, periodModel, paymentModel, totalPayment, valueAddedTax);
|
||||||
|
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
@@ -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="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>
|
||||||
|
</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
@@ -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
@@ -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>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center justify-content-start w-100 my-2 px-1">
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
101
ServiceHost/Pages/Register/_Partials/_Step4.cshtml
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
@{
|
||||||
|
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" id="cardSelected">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="w-100 p-0">
|
||||||
|
<div style="display: flex; gap: 15px; margin: auto 20px 0 0;">
|
||||||
|
<button type="button" class="btnStep4Tab active" id="priceStatic">
|
||||||
|
پرداخت یکجا
|
||||||
|
</button>
|
||||||
|
<button type="button" class="btnStep4Tab disable" id="priceStep">
|
||||||
|
پرداخت مرحله ای
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footerStep4Container">
|
||||||
|
<div class="titleFooter">مدت قرارداد</div>
|
||||||
|
<div class="radioBtnFooterContainer">
|
||||||
|
<input type="radio" id="oneMonth" value="1" name="radMonth" class="radioOption" disabled="disabled">
|
||||||
|
<label for="oneMonth" class="radioLabelListOption disable">1 ماهه</label>
|
||||||
|
|
||||||
|
<input type="radio" id="threeMonth" value="3" name="radMonth" class="radioOption" disabled="disabled">
|
||||||
|
<label for="threeMonth" class="radioLabelListOption disable">3 ماهه</label>
|
||||||
|
|
||||||
|
<input type="radio" id="sixMonth" value="6" name="radMonth" class="radioOption" disabled="disabled">
|
||||||
|
<label for="sixMonth" class="radioLabelListOption disable">6 ماهه</label>
|
||||||
|
|
||||||
|
<input type="radio" id="twelveMonth" value="12" name="radMonth" class="radioOption" checked="checked">
|
||||||
|
<label for="twelveMonth" class="radioLabelListOption">12 ماهه</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="infoPricesContainer" id="priceStepContainer" style="display: none">
|
||||||
|
<div class="item">
|
||||||
|
<div class="col-4 text-start">سررسید : اول</div>
|
||||||
|
<div class="col-4 text-start">1404/01/30</div>
|
||||||
|
<div class="col-4 text-end">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="col-4 text-start">سررسید : دوم</div>
|
||||||
|
<div class="col-4 text-start">1404/01/30</div>
|
||||||
|
<div class="col-4 text-end">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="col-4 text-start">سررسید : سوم</div>
|
||||||
|
<div class="col-4 text-start">1404/01/30</div>
|
||||||
|
<div class="col-4 text-end">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="col-4 text-start">سررسید : چهارم</div>
|
||||||
|
<div class="col-4 text-start">1404/01/30</div>
|
||||||
|
<div class="col-4 text-end">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="col-4 text-start">سررسید : پنجم</div>
|
||||||
|
<div class="col-4 text-start">1404/01/30</div>
|
||||||
|
<div class="col-4 text-end">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="col-4 text-start">سررسید : ششم</div>
|
||||||
|
<div class="col-4 text-start">1404/01/30</div>
|
||||||
|
<div class="col-4 text-end">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lineRegisterStep4 px-2"></div>
|
||||||
|
<div class="my-3">
|
||||||
|
<div class="d-flex align-items-center justify-content-between px-4">
|
||||||
|
<div class="titlePriceStep4">مجموع مبالغ:</div>
|
||||||
|
<div class="totalPriceStep4" id="sumOfWorkshopsPaymentPayment">-</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-between px-4">
|
||||||
|
<div class="titlePriceStep4">ارزش افزوده:</div>
|
||||||
|
<div class="totalPriceStep4" id="valueAddedTaxSt">-</div>
|
||||||
|
<input type="hidden" id="valueAddedTaxDoubleInput" />
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-between mt-1 px-4">
|
||||||
|
<div class="titlePriceStep4">مبلغ قابل پرداخت:</div>
|
||||||
|
<div class="totalPriceStep4" id="totalPaymentStr">-</div>
|
||||||
|
<input type="hidden" id="totalPaymentDoubleInput" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var receivedCodeFromServerUrl = `@Url.Page("./Index", "ReceivedCodeFromServer")`;
|
||||||
|
var totalPaymentAndWorkshopListUrl = `@Url.Page("./Index", "TotalPaymentAndWorkshopList")`;
|
||||||
|
var createOrUpdateInstitutionContractTemp = `@Url.Page("./Index", "CreateOrUpdateInstitutionContractTemp")`;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="~/assetsclient/pages/Register/js/_Partials/_Step4.js?ver=@clientVersion"></script>
|
||||||
106
ServiceHost/Pages/Register/_Partials/_Step5.cshtml
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
@{
|
||||||
|
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">قوانین و مقررات</div>
|
||||||
|
<p class="textDescStep5">
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
</p>
|
||||||
|
<div class="textH4DescStep5">1. لورم ایپسوم</div>
|
||||||
|
<p class="textDescStep5">
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
|
||||||
|
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را میطلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="lineRegisterStep5 px-2"></div>
|
||||||
|
<div class="w-100 px-2 my-3">
|
||||||
|
@* <div class="d-flex align-items-center justify-content-between my-4 px-4">
|
||||||
|
<div class="titlePriceStep5">مبلغ قابل پرداخت:</div>
|
||||||
|
<div class="totalPriceStep5">۲۵,۰۰۰,۰۰۰ ریال</div>
|
||||||
|
</div> *@
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center justify-content-between px-4">
|
||||||
|
<div class="titlePriceStep5">مجموع مبالغ:</div>
|
||||||
|
<div class="totalPriceStep5" id="sumOfWorkshopsPaymentPaymentStep5">-</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-between px-4">
|
||||||
|
<div class="titlePriceStep5">ارزش افزوده:</div>
|
||||||
|
<div class="totalPriceStep5" id="valueAddedTaxStStep5">-</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-between mt-1 px-4">
|
||||||
|
<div class="titlePriceStep5">مبلغ قابل پرداخت:</div>
|
||||||
|
<div class="totalPriceStep5" id="totalPaymentStrStep5">-</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
@@ -0,0 +1,71 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<div class="bg-[#D1DBE8] dark:bg-[#212330] p-9">
|
||||||
|
<div class="flex justify-between items-center border-b border-b-[#AEAEAE] dark:border-b-[#494B57] pb-3">
|
||||||
|
<div class="hidden md:flex items-center gap-3">
|
||||||
|
<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 lg:flex items-center text-[#515151] dark:text-white gap-3">
|
||||||
|
<div class="font-medium hover:text-[#424242] dark:hover:text-[#D0D0D0] duration-300 ease-in-out cursor-pointer">شرایط استفاده از خدمات</div>
|
||||||
|
<div class="font-medium hover:text-[#424242] dark:hover:text-[#D0D0D0] duration-300 ease-in-out cursor-pointer"><a asp-page="/rule/Index">سیاست حفظ حریم خصوصی</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="flex flex-col md:flex-row justify-between items-center pt-6">
|
||||||
|
<div class="hidden md:flex items-center gap-3">
|
||||||
|
<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] dark:text-white text-center order-2 md:order-1">کلیه حقوق مادی و معنوی این وب سایت برای شرکت دانش بنیان گزارشگیر محفوظ می باشد.</div>
|
||||||
|
|
||||||
|
<div class="flex items-center justify-between w-full md:w-auto order-1 md:order-2">
|
||||||
|
<div class="flex md:hidden items-center gap-3">
|
||||||
|
<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="">
|
||||||
|
<img src="~/assetsmain/images/enamed-park.png" class="w-24" alt="" srcset="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
383
ServiceHost/Pages/Shared/_Header.cshtml
Normal file
@@ -0,0 +1,383 @@
|
|||||||
|
@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 dark:bg-[#212330] py-3 px-1 md:px-3 lg:px-6 border-b-2 border-b-gray-200 dark:border-b-[#212330] z-[100] sticky top-0">
|
||||||
|
<div class="flex items-center justify-between space-x-3">
|
||||||
|
<div class="hidden lg:flex items-center gap-2">
|
||||||
|
<div class="text-[#138A8A] text-[0.75rem] lg:text-[0.86rem] font-[800]">گزارشگیر</div>
|
||||||
|
<div class="text-[#138A8A] text-[0.71rem] lg:text-[0.82rem] font-[700]">سامانه هوشمند مدیریت منابع انسانی</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex lg:hidden items-center gap-3">
|
||||||
|
|
||||||
|
<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 lg:gap-5 text-[#575757] dark:text-white">
|
||||||
|
<div class="hidden lg:flex gap-3">
|
||||||
|
<div class="text-[0.75rem] lg:text-[0.86rem] font-[500]">پایگاه دانش</div>
|
||||||
|
<div class="text-[0.75rem] lg:text-[0.86rem] font-[500]"><a asp-page="/about-us/Index">درباره ما</a></div>
|
||||||
|
<div class="text-[0.75rem] lg:text-[0.86rem] font-[500]"><a asp-page="/contact-us/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 lg:flex items-center justify-between space-x-3 px-3">
|
||||||
|
<div class="flex items-center gap-9">
|
||||||
|
<img src="~/AssetsMain/images/logo.svg" class="w-16" alt="" srcset="">
|
||||||
|
<ul class="flex items-center gap-9 text-[#575757] dark:text-white">
|
||||||
|
<li class="text-[0.8rem] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] cursor-pointer duration-300 ease-in-out"><a asp-page="/Index">صفحه اصلی</a></li>
|
||||||
|
<li class="text-[0.8rem] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] cursor-pointer duration-300 ease-in-out">خدمات</li>
|
||||||
|
<li class="text-[0.8rem] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] cursor-pointer duration-300 ease-in-out">منابع دانش</li>
|
||||||
|
<li class="text-[0.8rem] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] cursor-pointer duration-300 ease-in-out"><a asp-page="/contact-us/Index">تماس با ما</a></li>
|
||||||
|
<li class="text-[0.8rem] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] cursor-pointer duration-300 ease-in-out"><a asp-page="/about-us/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 hover:bg-[#2DBCBC] border-2 border-[#2DBCBC] text-[#138F8F] hover:text-white rounded-md duration-500 ease-in-out">
|
||||||
|
@* <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 hover:bg-[#2DBCBC] border-2 border-[#2DBCBC] text-[#138F8F] hover:text-white rounded-md duration-500 ease-in-out">
|
||||||
|
<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 hover:bg-[#2DBCBC] border-2 border-[#2DBCBC] text-[#138F8F] hover:text-white rounded-md duration-500 ease-in-out">
|
||||||
|
<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 hover:bg-[#2DBCBC] border-2 border-[#2DBCBC] text-[#138F8F] hover:text-white rounded-md duration-500 ease-in-out">
|
||||||
|
<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 dark:bg-[#171923] transform translate-x-full transition-transform duration-300 z-30">
|
||||||
|
<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] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] duration-300 ease-in-out my-1">
|
||||||
|
<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] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] duration-300 ease-in-out my-1">
|
||||||
|
<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] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] duration-300 ease-in-out my-1">
|
||||||
|
<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] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] duration-300 ease-in-out my-1">
|
||||||
|
<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] lg:text-[0.9rem] font-[600] hover:text-[#282828] dark:hover:text-[#c9c9c9] duration-300 ease-in-out my-1">
|
||||||
|
<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 dark:authBgLog mb-2">
|
||||||
|
<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
|
@using Microsoft.AspNetCore.Razor.Language.Intermediate
|
||||||
|
@using Version = _0_Framework.Application.Version
|
||||||
@{
|
|
||||||
string styleVersion = _0_Framework.Application.Version.StyleVersion;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -18,10 +13,11 @@
|
|||||||
@RenderSection("head", false)
|
@RenderSection("head", false)
|
||||||
|
|
||||||
|
|
||||||
<link href="~/AssetsClient/css/bootstrap.rtl.min.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=@styleVersion" rel="stylesheet" />
|
<link href="~/AssetsClient/css/style.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||||
<link href="~/AssetsClient/css/responsive.css?ver=@styleVersion" rel="stylesheet" />
|
<link href="~/AssetsClient/css/responsive.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||||
<link href="~/AssetsClient/css/validation-style.css?ver=@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-3.7.1.min.js"></script>
|
||||||
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
<script src="~/AssetsClient/js/jquery-ui.js"></script>
|
||||||
@@ -42,7 +38,6 @@
|
|||||||
|
|
||||||
<!-- Begin page -->
|
<!-- Begin page -->
|
||||||
@RenderBody()
|
@RenderBody()
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
@@ -50,17 +45,59 @@
|
|||||||
|
|
||||||
|
|
||||||
<script src="~/AssetsClient/js/bootstrap.bundle.min.js"></script>
|
<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>
|
<script>
|
||||||
//******************** رسپانسیو هنگام موبایل ********************
|
|
||||||
$('#show_login').click(function() {
|
function convertPersianNumbersToEnglish(input) {
|
||||||
$( ".bg-login" ).hide("slide", { direction: "left" }, 500);
|
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
|
||||||
$('.login').removeClass('d-none');
|
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
|
||||||
// $('.login').addClass('d-flex');
|
|
||||||
$('.login').show("slide", { direction: "right" }, 500);
|
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>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
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
@@ -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>
|
||||||
|
<!-- پیغام موفق -->
|
||||||
45
ServiceHost/Pages/about-us/Index.cshtml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
@page
|
||||||
|
@model ServiceHost.Pages.about_us.IndexModel
|
||||||
|
@{
|
||||||
|
Layout = "Shared/_LayoutHome";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="py-1 relative 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-[1.1rem] md:text-[1.4rem] font-[900] dark:text-white">
|
||||||
|
داستان گزارشگیر
|
||||||
|
</div>
|
||||||
|
<p class="text-[#666666] text-[0.8rem] md:text-[0.9rem] font-[800] dark:text-white text-justify">
|
||||||
|
لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ، و با استفاده از طراحان گرافیک است، چاپگرها و متون بلکه روزنامه و مجله در ستون و سطرآنچنان که لازم است، و برای شرایط فعلی تکنولوژی مورد نیاز، و کاربردهای متنوع با هدف بهبود ابزارهای کاربردی می باشد، کتابهای زیادی در شصت و سه درصد گذشته حال و آینده، شناخت فراوان جامعه و متخصصان را می طلبد، تا با نرم افزارها شناخت بیشتری را برای طراحان رایانه ای علی الخصوص طراحان خلاقی، و فرهنگ پیشرو در زبان فارسی ایجاد کرد، در این صورت می توان امید داشت که تمام و دشواری موجود در ارائه راهکارها، و شرایط سخت تایپ به پایان رسد و زمان مورد نیاز شامل حروفچینی دستاوردهای اصلی، و جوابگوی سوالات پیوسته اهل دنیای موجود طراحی اساسا مورد استفاده قرار گیرد.
|
||||||
|
</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 md:flex-row justify-between items-center gap-4">
|
||||||
|
<img src="~/assetsmain/images/rectangle-4729.png" class="w-full md:w-80 lg:w-full rounded-xl" alt="" srcset="">
|
||||||
|
<p class="font-[600] text-[0.9rem] md:text-[0.95rem] lg:text-[1rem] text-justify dark:text-white">
|
||||||
|
شرکت گزارشگیر فعالیت خود را از سال ۱۳۸۰ در شهر رشت، استان گیلان آغاز کرده است. ما با تمرکز بر مدیریت هوشمند منابع انسانی، راهکارهایی جامع و یکپارچه برای سازمانها و کسبوکارها فراهم میکنیم.
|
||||||
|
محصولات و خدمات ما شامل مدیریت فیش حقوقی، قراردادها، حضور و غیاب، مرخصیها، امور مالی و بسیاری قابلیتهای دیگر است که با هدف افزایش بهرهوری، دقت و شفافیت در فرآیندهای منابع انسانی طراحی شدهاند.
|
||||||
|
ما در گزارشگیر همواره در تلاشیم تا با بهرهگیری از فناوریهای روز و نیازهای بومی، فرآیندهای اداری و منابع انسانی را برای سازمانها سادهتر، سریعتر و هوشمندانهتر کنیم.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-center gap-4 my-3">
|
||||||
|
<div class="flex flex-col md:flex-row justify-between items-center gap-4">
|
||||||
|
<p class="font-[600] text-[0.9rem] md:text-[0.95rem] lg:text-[1rem] text-justify dark:text-white">
|
||||||
|
شرکت گزارشگیر فعالیت خود را از سال ۱۳۸۰ در شهر رشت، استان گیلان آغاز کرده است. ما با تمرکز بر مدیریت هوشمند منابع انسانی، راهکارهایی جامع و یکپارچه برای سازمانها و کسبوکارها فراهم میکنیم.
|
||||||
|
محصولات و خدمات ما شامل مدیریت فیش حقوقی، قراردادها، حضور و غیاب، مرخصیها، امور مالی و بسیاری قابلیتهای دیگر است که با هدف افزایش بهرهوری، دقت و شفافیت در فرآیندهای منابع انسانی طراحی شدهاند.
|
||||||
|
ما در گزارشگیر همواره در تلاشیم تا با بهرهگیری از فناوریهای روز و نیازهای بومی، فرآیندهای اداری و منابع انسانی را برای سازمانها سادهتر، سریعتر و هوشمندانهتر کنیم
|
||||||
|
</p>
|
||||||
|
<img src="~/assetsmain/images/rectangle-4730.png" class="w-full md:w-80 lg:w-full rounded-xl" alt="" srcset="">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
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()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
512
ServiceHost/Pages/contact-us/Index.cshtml
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
@@ -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
@@ -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; }
|
||||||
|
}
|
||||||
267
ServiceHost/Pages/rule/Index.cshtml
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()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -237,26 +237,15 @@
|
|||||||
<None Include="Areas\Client\Pages\Company\EmployeesBankInfo\_Partials\EditBankInfoModal.cshtml" />
|
<None Include="Areas\Client\Pages\Company\EmployeesBankInfo\_Partials\EditBankInfoModal.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\EmployeesDocuments\Index.cshtml" />
|
<None Include="Areas\Client\Pages\Company\EmployeesDocuments\Index.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\EmployeesDocuments\ModalUploadDocument.cshtml" />
|
<None Include="Areas\Client\Pages\Company\EmployeesDocuments\ModalUploadDocument.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\alert.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\ChangeCode.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\ContractCheckoutStatus.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\ContractCheckoutStatus.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\ContractCheckoutStatusPrint.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\ContractCheckoutStatusPrint.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\Create.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\CreateLeave.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\CreateLeave.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\Details.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\Details.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\Edit.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\EditLeave.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\EditLeave.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\EditPaidLeave.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\EditSick.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\EmployeePayment.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\Index.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\Index.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\Leave.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\Leave.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\LeaveCreateModal.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\LeaveCreateModal.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\LeavePrintAll.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\LeavePrintAll.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\LeftWork.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\LeftWorkInsurance.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PaidLeave.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PaidLeaveList.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PrintAll.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\PrintAll.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PrintAllDetailsPersonnelInfo.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\PrintAllDetailsPersonnelInfo.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PrintAllDetailsPersonnelInfoMobile.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\PrintAllDetailsPersonnelInfoMobile.cshtml" />
|
||||||
@@ -266,8 +255,6 @@
|
|||||||
<None Include="Areas\Client\Pages\Company\Employees\PrintOne.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\PrintOne.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PrintOneMobile.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\PrintOneMobile.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\PrintOnePersonnelInfo.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\PrintOnePersonnelInfo.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\SickLeave.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\SickLeaveList.cshtml" />
|
|
||||||
<None Include="Areas\Client\Pages\Company\Employees\WorkshopList.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Employees\WorkshopList.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Error\_ErrorModal.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Error\_ErrorModal.cshtml" />
|
||||||
<None Include="Areas\Client\Pages\Company\Fine\CRUDFineSubjectModal.cshtml" />
|
<None Include="Areas\Client\Pages\Company\Fine\CRUDFineSubjectModal.cshtml" />
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ const darkModeToggle = document.querySelector("#btn-darkmode");
|
|||||||
// const darkModeMobileToggle = document.querySelector("#btn-mobiledarkmode");
|
// const darkModeMobileToggle = document.querySelector("#btn-mobiledarkmode");
|
||||||
|
|
||||||
const enableDarkMode = () => {
|
const enableDarkMode = () => {
|
||||||
document.body.classList.add("darkmode");
|
document.documentElement.classList.add("dark");
|
||||||
|
//document.body.classList.add("dark");
|
||||||
localStorage.setItem("darkMode", "enabled");
|
localStorage.setItem("darkMode", "enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
const disableDarkMode = () => {
|
const disableDarkMode = () => {
|
||||||
document.body.classList.remove("darkmode");
|
document.documentElement.classList.remove("dark");
|
||||||
|
//document.body.classList.remove("dark");
|
||||||
localStorage.setItem("darkMode", null);
|
localStorage.setItem("darkMode", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendRequest({ url, method = "GET", data = {}, async = true }) {
|
sendRequest({ url, method = "GET", data = {}, async = true }) {
|
||||||
|
console.log("data");
|
||||||
|
console.log(data);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
type: method,
|
type: method,
|
||||||
data: method === "GET" ? data : JSON.stringify(data),
|
data: data,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
async: async,
|
async: async,
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
351
ServiceHost/wwwroot/AssetsClient/pages/Register/css/Index.css
Normal file
@@ -0,0 +1,351 @@
|
|||||||
|
.registerTitleSteps {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 900;
|
||||||
|
color: #22A8A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.customRegisterSteps {
|
||||||
|
padding: 12px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: start;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.contactUsImage {
|
||||||
|
background: linear-gradient(101.76deg, #146868 0%, #035757 100%);
|
||||||
|
border-radius: 20px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #ffffff;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage .svgLine {
|
||||||
|
top: 0;
|
||||||
|
right: -9px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage h3 {
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #ffffff;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage p {
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: justify;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage a {
|
||||||
|
font-weight: 500 !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
text-align: center;
|
||||||
|
color: #138F8F !important;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: 1px solid #2DBCBC;
|
||||||
|
width: 132px !important;
|
||||||
|
margin: 3px auto auto;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.errored {
|
||||||
|
animation: shake 300ms;
|
||||||
|
color: #eb3434 !important;
|
||||||
|
background-color: #fef2f2 !important;
|
||||||
|
border: 1px solid #eb3434 !important;
|
||||||
|
border-radius: 9px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressStepDiv {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin: 30px auto;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressSteps {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
gap: 9px;
|
||||||
|
}
|
||||||
|
.progressSteps.currentStep {
|
||||||
|
color: #22A8A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progressSteps.completeStep {
|
||||||
|
color: #A3E635 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bulletContainer {
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
gap: 24px;
|
||||||
|
bottom: -6px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bullet {
|
||||||
|
background-color: #D9D9D9 !important;
|
||||||
|
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.3);
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
border-radius: 20px;
|
||||||
|
}
|
||||||
|
.bullet.currentStep {
|
||||||
|
background-color: #22A8A8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bullet.completeStep {
|
||||||
|
background-color: #A3E635 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.numberSteps {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #C7C7C7;
|
||||||
|
border: 4px solid #C7C7C7;
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 50px;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.currentStep .numberSteps {
|
||||||
|
border-color: #22A8A8;
|
||||||
|
color: #22A8A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.completeStep .numberSteps {
|
||||||
|
border-color: #A3E635;
|
||||||
|
color: #A3E635;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textTitleSteps {
|
||||||
|
color: #C7C7C7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textTitleSteps div:first-child {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textTitleSteps div:last-child {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.currentStep .textTitleSteps {
|
||||||
|
color: #22A8A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.completeStep .textTitleSteps {
|
||||||
|
color: #A3E635;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.customRegisterForm {
|
||||||
|
border-right: 1px solid #D0D0D0;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stepBtn {
|
||||||
|
background-color: #84CC16;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 6px 9px;
|
||||||
|
width: 180px;
|
||||||
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stepBtn:hover {
|
||||||
|
background-color: #5f9213;
|
||||||
|
}
|
||||||
|
|
||||||
|
.step {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 90vh;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------------ Step 1 ------------------------------ */
|
||||||
|
.authorizeStep, .infoStep {
|
||||||
|
width: 39%;
|
||||||
|
margin: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.labelRegisterForm {
|
||||||
|
color: #5C5C5C;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control {
|
||||||
|
border-radius: 10px !important;
|
||||||
|
border: 1px solid #C6C6C6;
|
||||||
|
font-size: 14px !important;
|
||||||
|
padding: 9px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnEnter {
|
||||||
|
background: rgb(46,191,191);
|
||||||
|
background: linear-gradient(130deg, rgba(46,191,191,1) 0%, rgba(10,119,119,1) 100%);
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
padding: 9px;
|
||||||
|
margin: 60px auto auto;
|
||||||
|
width: 90%
|
||||||
|
}
|
||||||
|
/* ------------------------------ Step 1 ------------------------------ */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------------ Step 2 ------------------------------ */
|
||||||
|
.lineRegister {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border-radius: 50px;
|
||||||
|
background: rgb(238,238,238);
|
||||||
|
background: linear-gradient(90deg, rgba(238,238,238,1) 0%, rgba(46,46,46,1) 50%, rgba(238,238,238,1) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlePrice {
|
||||||
|
color: #737373;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPrice {
|
||||||
|
color: #1ABA3D;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
/* ------------------------------ Step 2 ------------------------------ */
|
||||||
|
.openAction {
|
||||||
|
margin: 6px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||||
|
left: 0;
|
||||||
|
right: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||||
|
padding-right: 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.operations-btns {
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 0px 0px 8px 8px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
border-top: 1px solid #CACACA;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:1366px) {
|
||||||
|
.progressStepDiv {
|
||||||
|
gap: 15px;
|
||||||
|
margin: 20px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.numberSteps {
|
||||||
|
font-weight: 800;
|
||||||
|
width: 45px;
|
||||||
|
height: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textTitleSteps div:first-child {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textTitleSteps div:last-child {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.authorizeStep, .infoStep {
|
||||||
|
width: 63%;
|
||||||
|
margin: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage {
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage h3 {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage p {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.contactUsImage a {
|
||||||
|
font-size: 13px !important;
|
||||||
|
width: 122px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:992px) {
|
||||||
|
.progressSteps {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.customRegisterSteps {
|
||||||
|
height: 90px;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.authorizeStep, .infoStep {
|
||||||
|
width: 100%;
|
||||||
|
margin: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.progressSteps.currentStep {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.form-control {
|
||||||
|
margin: 0 0 5px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stepBtn {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,334 @@
|
|||||||
|
.select2.select2-container .select2-selection {
|
||||||
|
font-size: 14px !important;
|
||||||
|
padding: 9px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select2-container .select2-selection--single {
|
||||||
|
height: 41px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workshopListItem {
|
||||||
|
width: 100%;
|
||||||
|
background-color: #ECFFFF;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 9px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workshopListItem .titleWP {
|
||||||
|
color: #0B5959;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.accordion-item .titleWP {
|
||||||
|
color: #0B5959;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openBtnWP {
|
||||||
|
background-color: #B6F2E1;
|
||||||
|
width: 25px;
|
||||||
|
height: 25px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openBtnWP svg {
|
||||||
|
transform: rotate(0);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openBtnWP.expanded svg {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.openBtnWP:hover {
|
||||||
|
background-color: #b0e9d9;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.badgeWP {
|
||||||
|
background-color: #B6F2E1;
|
||||||
|
border: 1px solid #059669;
|
||||||
|
border-radius: 50px;
|
||||||
|
width: 60px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
|
color: #0B5959;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPayWP {
|
||||||
|
color: #0B5959;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
width: 1px;
|
||||||
|
height: 27px;
|
||||||
|
border-left: 1px dashed #CACACA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workshop-form-control {
|
||||||
|
width: 240px
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPaymentWP {
|
||||||
|
color: #1ABA3D;
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: 800;
|
||||||
|
text-align: end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleInfoWP {
|
||||||
|
color: #5C5C5C;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.main {
|
||||||
|
max-height: 480px;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion {
|
||||||
|
max-width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion-item {
|
||||||
|
outline: none;
|
||||||
|
margin: 12px 0;
|
||||||
|
border-bottom: 1.3px solid #e0e0e0;
|
||||||
|
border-radius: 12px;
|
||||||
|
background-color: #ECFFFF;
|
||||||
|
border: 1px solid #CACACA;
|
||||||
|
overflow: hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion-item .title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion-item .title i.fas {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #333333;
|
||||||
|
transform: translateX(-50%) rotate(0);
|
||||||
|
transition: transform 0.15s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion-item .paragraph {
|
||||||
|
background-color: #ffffff;
|
||||||
|
color: #333333;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion-item.active .title i.fas {
|
||||||
|
color: #1a9de1;
|
||||||
|
transform: translateX(-50%) rotate(180deg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.operations-btns {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.btnRadioContainer {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioOption {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioLabelListOption {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #0F8080;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #1D9D9D;
|
||||||
|
text-align: center;
|
||||||
|
padding: 6px 9px;
|
||||||
|
border-radius: 9px;
|
||||||
|
width: 160px;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioLabelListOption:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #1c7474;
|
||||||
|
border-color: #23A8A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioOption:checked + .radioLabelListOption {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #1D9D9D;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnAdd {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #84CC16;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
padding: 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnAdd:hover {
|
||||||
|
background-color: #5f9213;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnRemove {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: #F87171;
|
||||||
|
border-radius: 7px;
|
||||||
|
padding: 3px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnRemove:hover {
|
||||||
|
background-color: #d55c5c;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1366px) {
|
||||||
|
/*.btnRadioContainer {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}*/
|
||||||
|
.radioLabelListOption {
|
||||||
|
width: 134px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPayWP {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPaymentWP {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 1200px) {
|
||||||
|
|
||||||
|
.btnRadioContainer {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPayWP {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioLabelListOption {
|
||||||
|
width: 129px;
|
||||||
|
padding: 4px 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media only screen and (max-width: 768px) {
|
||||||
|
.main {
|
||||||
|
max-height: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main .accordion {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnRadioContainer {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioLabelListOption {
|
||||||
|
width: 100%;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPayWP {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPaymentWP {
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20px;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,264 @@
|
|||||||
|
.step4Container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
height: 80vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnStep4Tab {
|
||||||
|
color: #2B2F32;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
background-color:#ffffff;
|
||||||
|
padding: 9px;
|
||||||
|
margin: auto 9px auto 6px;
|
||||||
|
border-radius:9px 9px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnStep4Tab:hover {
|
||||||
|
background-color: #178F8F;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btnStep4Tab.active {
|
||||||
|
background-color: #178F8F;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.cardHeight {
|
||||||
|
height: 500px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardContainer {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 10px;
|
||||||
|
display: grid;
|
||||||
|
gap: 9px;
|
||||||
|
overflow: auto;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardGrid {
|
||||||
|
border: 1px solid #CACACA;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 9px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
.cardGrid .titleWpName {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #0B5959;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardGrid.titleWpPrice {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #0B5959;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.btnCheckContainer {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkOption {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkLabelListOption {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #2B2F32;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
gap: 3px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #BEBEBE;
|
||||||
|
text-align: center;
|
||||||
|
padding: 6px 9px;
|
||||||
|
border-radius: 9px;
|
||||||
|
width: 100%;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
height: 35px;
|
||||||
|
/*cursor: pointer;*/
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkLabelListOption svg{
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkLabelListOption:hover {
|
||||||
|
border-color: #84CC16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkOption:checked + .checkLabelListOption {
|
||||||
|
border: 1px solid #84CC16;
|
||||||
|
}
|
||||||
|
.checkOption:checked + .checkLabelListOption svg {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.footerStep4Container {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 1px solid #178F8F;
|
||||||
|
padding: 6px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerStep4Container .titleFooter {
|
||||||
|
color: #5C5C5C;
|
||||||
|
font-size:12px;
|
||||||
|
font-weight:500;
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.footerStep4Container .radioBtnFooterContainer {
|
||||||
|
display: flex;
|
||||||
|
/*grid-template-columns: repeat(4, minmax(0, 1fr));*/
|
||||||
|
gap: 9px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerStep4Container .radioOption {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerStep4Container .radioLabelListOption {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #0F8080;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border: 1px solid #1D9D9D;
|
||||||
|
text-align: center;
|
||||||
|
padding: 6px 9px;
|
||||||
|
border-radius: 9px;
|
||||||
|
width: 160px;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
cursor: pointer;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerStep4Container .radioLabelListOption:hover {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #1c7474;
|
||||||
|
border-color: #23A8A8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerStep4Container .radioOption:checked + .footerStep4Container .radioLabelListOption {
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #1D9D9D;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.infoPricesContainer {
|
||||||
|
padding: 6px;
|
||||||
|
border: 1px solid #E7E7E7;
|
||||||
|
border-radius: 16px;
|
||||||
|
background-color: #F5F5F5;
|
||||||
|
display: grid;
|
||||||
|
gap: 6px;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.infoPricesContainer .item {
|
||||||
|
padding: 4px;
|
||||||
|
border: 1px solid #DDDDDD;
|
||||||
|
border-radius: 7px;
|
||||||
|
background-color: #ECFFFF;
|
||||||
|
color: #0B5959;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lineRegisterStep4 {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border-radius: 50px;
|
||||||
|
background: rgb(238,238,238);
|
||||||
|
background: linear-gradient(90deg, rgba(238,238,238,1) 0%, rgba(46,46,46,1) 50%, rgba(238,238,238,1) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlePriceStep4 {
|
||||||
|
color: #737373;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPriceStep4 {
|
||||||
|
color: #1ABA3D;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width:1366px) {
|
||||||
|
.cardContainer {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerStep4Container .radioLabelListOption {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkLabelListOption {
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardHeight {
|
||||||
|
height: 260px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:992px) {
|
||||||
|
.footerStep4Container .radioLabelListOption {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.infoPricesContainer {
|
||||||
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||||
|
height: 130px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cardHeight {
|
||||||
|
height: 48vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:768px) {
|
||||||
|
.cardContainer {
|
||||||
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width:540px) {
|
||||||
|
.footerStep4Container .radioLabelListOption {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
.descriptionStep5 {
|
||||||
|
border: 1px solid #CACACA;
|
||||||
|
border-radius: 7px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
padding: 6px;
|
||||||
|
box-shadow: 0 5px 10px rgba(0,0,0, 0.1);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.descriptionContainerStep5 {
|
||||||
|
overflow-y: auto;
|
||||||
|
height: 66vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titleDescStep5 {
|
||||||
|
color: #5C5C5C;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textH4DescStep5 {
|
||||||
|
color: #000000;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textDescStep5 {
|
||||||
|
color: #000000;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.lineRegisterStep5 {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border-radius: 50px;
|
||||||
|
background: rgb(238,238,238);
|
||||||
|
background: linear-gradient(90deg, rgba(238,238,238,1) 0%, rgba(46,46,46,1) 50%, rgba(238,238,238,1) 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlePriceStep5 {
|
||||||
|
color: #737373;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.totalPriceStep5 {
|
||||||
|
color: #1ABA3D;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.otpRegister {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
direction: ltr;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.otpRegister .form-control {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.registerBtnStep5 .modal-dialog {
|
||||||
|
max-width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
.otpRegister .form-control {
|
||||||
|
padding: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 576px) {
|
||||||
|
.form-control {
|
||||||
|
margin: unset !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
142
ServiceHost/wwwroot/AssetsClient/pages/Register/js/Index.js
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
class Step {
|
||||||
|
constructor(form, stepNumber, validator = () => Promise.resolve(true), validatorsPrev = () => Promise.resolve(true)) {
|
||||||
|
this.form = form;
|
||||||
|
this.stepNumber = stepNumber;
|
||||||
|
this.validator = validator;
|
||||||
|
this.validatorsPrev = validatorsPrev;
|
||||||
|
}
|
||||||
|
|
||||||
|
async validate() {
|
||||||
|
return await this.validator();
|
||||||
|
}
|
||||||
|
|
||||||
|
async onNext() {
|
||||||
|
if (await this.validate()) {
|
||||||
|
this.form.setStep(this.form.currentStep + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async onPrev() {
|
||||||
|
if (await this.validatorsPrev()) {
|
||||||
|
this.form.setStep(this.form.currentStep - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MultiStepForm {
|
||||||
|
constructor(stepSelectors, validators = [], validatorsPrev = []) {
|
||||||
|
this.steps = stepSelectors.map((selector, index) => new Step(
|
||||||
|
this,
|
||||||
|
index + 1,
|
||||||
|
validators[index] || (() => Promise.resolve(true)),
|
||||||
|
validatorsPrev[index] || (() => Promise.resolve(true))
|
||||||
|
));
|
||||||
|
this.currentStep = 1;
|
||||||
|
this.showStep();
|
||||||
|
}
|
||||||
|
|
||||||
|
setStep(step) {
|
||||||
|
if (step < 1 || step > this.steps.length) return;
|
||||||
|
|
||||||
|
let previousStep = this.currentStep;
|
||||||
|
this.currentStep = step;
|
||||||
|
|
||||||
|
updateStepClasses(previousStep, this.currentStep, "progressSteps");
|
||||||
|
updateStepClasses(previousStep, this.currentStep, "bullet");
|
||||||
|
|
||||||
|
this.showStep();
|
||||||
|
}
|
||||||
|
|
||||||
|
showStep() {
|
||||||
|
$(".step").hide();
|
||||||
|
$("#step" + this.currentStep).fadeIn();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
const stepSelectors = ["#step1", "#step2", "#step3", "#step4", "#step5"];
|
||||||
|
const validators = [
|
||||||
|
checkInputsStep1,
|
||||||
|
checkInputsStep2,
|
||||||
|
checkInputsStep3,
|
||||||
|
checkInputsStep4,
|
||||||
|
() => Promise.resolve(true)
|
||||||
|
];
|
||||||
|
|
||||||
|
const validatorsPrev = [
|
||||||
|
() => Promise.resolve(true),
|
||||||
|
() => Promise.resolve(true),
|
||||||
|
() => Promise.resolve(true),
|
||||||
|
step4Action,
|
||||||
|
() => Promise.resolve(true)
|
||||||
|
];
|
||||||
|
|
||||||
|
// const form = new MultiStepForm();
|
||||||
|
const form = new MultiStepForm(stepSelectors, validators, validatorsPrev);
|
||||||
|
|
||||||
|
|
||||||
|
$(".stepBtn:contains('مرحله بعد')").click(() => form.steps[form.currentStep - 1].onNext());
|
||||||
|
$(".stepBtn:contains('مرحله قبل')").click(() => form.steps[form.currentStep - 1].onPrev());
|
||||||
|
|
||||||
|
|
||||||
|
$("#btnGetUidInfo").click(async function () {
|
||||||
|
let isValid = await form.steps[0].validate();
|
||||||
|
if (isValid) {
|
||||||
|
form.setStep(2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//$("#btnGetUidInfo").click(async function () {
|
||||||
|
// let isValid = await form.steps[0].validate();
|
||||||
|
// if (isValid) {
|
||||||
|
// form.setStep(2);
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
});
|
||||||
|
|
||||||
|
function updateStepClasses(prev, current, className) {
|
||||||
|
if (!prev || !current || !className) return;
|
||||||
|
|
||||||
|
let prevStepElements = $(`.${className}[data-step='${prev}']`);
|
||||||
|
let currentStepElements = $(`.${className}[data-step='${current}']`);
|
||||||
|
|
||||||
|
if (prevStepElements.length) {
|
||||||
|
prevStepElements.removeClass("currentStep").addClass("completeStep");
|
||||||
|
|
||||||
|
let title = currentStepElements.find('.textTitleSteps div:first').text();
|
||||||
|
if (title) {
|
||||||
|
$('.registerTitleSteps').text(title);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentStepElements.length) {
|
||||||
|
currentStepElements.removeClass("completeStep").addClass("currentStep");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('click', ".workshopListItem", function () {
|
||||||
|
let $currentAccordionItem = $(this).closest('.accordion-item');
|
||||||
|
let $currentOperationsBtns = $currentAccordionItem.find(".operations-btns");
|
||||||
|
|
||||||
|
$(".openBtnWP").not($(this).find('.openBtnWP')).removeClass('expanded');
|
||||||
|
$(this).find('.openBtnWP').toggleClass('expanded');
|
||||||
|
|
||||||
|
$currentOperationsBtns.slideToggle(300);
|
||||||
|
$(".operations-btns").not($currentOperationsBtns).slideUp(300);
|
||||||
|
});
|
||||||
|
|
||||||
|
function validateField(selector, message, time) {
|
||||||
|
$(selector).addClass("errored");
|
||||||
|
$('.alert-msg').show();
|
||||||
|
$('.alert-msg p').text(message);
|
||||||
|
setTimeout(function () {
|
||||||
|
$('.alert-msg').hide();
|
||||||
|
$('.alert-msg p').text("");
|
||||||
|
$(selector).removeClass("errored");
|
||||||
|
}, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearAlert(inputElement) {
|
||||||
|
inputElement.removeClass("errored");
|
||||||
|
$('.alert-msg').hide().find('p').text('');
|
||||||
|
}
|
||||||
@@ -0,0 +1,139 @@
|
|||||||
|
|
||||||
|
var globalPhone = "";
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("#nationalCode").mask("0000000000");
|
||||||
|
$(document).on('input', "#nationalCode", function () {
|
||||||
|
let value = $(this).val();
|
||||||
|
let englishValue = convertPersianNumbersToEnglish(value);
|
||||||
|
|
||||||
|
englishValue = englishValue.replace(/\D/g, '');
|
||||||
|
|
||||||
|
$(this).val(englishValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#phoneNumber").mask("00000000000");
|
||||||
|
$(document).on('input', "#phoneNumber", function () {
|
||||||
|
let value = $(this).val();
|
||||||
|
let englishValue = convertPersianNumbersToEnglish(value);
|
||||||
|
|
||||||
|
englishValue = englishValue.replace(/\D/g, '');
|
||||||
|
|
||||||
|
$(this).val(englishValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#birthdate").each(function () {
|
||||||
|
let element = $(this);
|
||||||
|
element.on('input', function () {
|
||||||
|
let value = convertPersianNumbersToEnglish(element.val());
|
||||||
|
element.val(value);
|
||||||
|
});
|
||||||
|
|
||||||
|
new Cleave(this, {
|
||||||
|
date: true,
|
||||||
|
delimiter: '/',
|
||||||
|
datePattern: ['Y', 'm', 'd']
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
async function checkInputsStep1() {
|
||||||
|
let nationalCode = $("#nationalCode").val().trim();
|
||||||
|
let birthdate = $("#birthdate").val();
|
||||||
|
let phoneNumber = $("#phoneNumber").val();
|
||||||
|
|
||||||
|
if (!nationalCode || !birthdate || !phoneNumber) {
|
||||||
|
if (nationalCode === "" && birthdate === "" && phoneNumber === "") {
|
||||||
|
validateField('input', 'لطفاً تمام فیلدها را پر نمایید', 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nationalCode === "" || nationalCode.length !== 10) {
|
||||||
|
validateField("#nationalCode", "لطفا شماره ملی را به درستی وارد نمایید", 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (birthdate === "" || birthdate.length !== 10) {
|
||||||
|
validateField("#birthdate", "لطفا تاریخ تولد را وارد نمایید", 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (phoneNumber === "" || phoneNumber.length !== 11) {
|
||||||
|
validateField("#phoneNumber", "لطفا شماره موبایل را وارد نمایید", 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const commandStep1 = {
|
||||||
|
mobile: phoneNumber,
|
||||||
|
birthDate: birthdate,
|
||||||
|
nationalCode: nationalCode
|
||||||
|
};
|
||||||
|
console.log(commandStep1);
|
||||||
|
var btnDisable = $('#btnGetUidInfo').addClass('disable');
|
||||||
|
var loading = $('#btnGetUidInfo .loading').show();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await ajax.post(createContractingPartyTempUrl, commandStep1, true);
|
||||||
|
if (response.success) {
|
||||||
|
$('.alert-success-msg').show();
|
||||||
|
$('.alert-success-msg p').text(response.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-success-msg').hide();
|
||||||
|
$('.alert-success-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
|
||||||
|
// ************ Infos for Step 2 ************
|
||||||
|
$('#contractPartyId').val(response.data.id);
|
||||||
|
$('#firstName').val(response.data.fName);
|
||||||
|
$('#lastName').val(response.data.lName);
|
||||||
|
$('#birthdayDate').val(response.data.dateOfBirthFa);
|
||||||
|
$('#fatherName').val(response.data.fatherName);
|
||||||
|
$('#nationalNumber').val(response.data.nationalCode);
|
||||||
|
globalPhone = response.data.phone;
|
||||||
|
|
||||||
|
// The State and City
|
||||||
|
$('#state').select2();
|
||||||
|
$('#state').val(response.data.state).trigger('change');
|
||||||
|
iranwebsv(response.data.state);
|
||||||
|
setTimeout(function () {
|
||||||
|
$('#city').select2();
|
||||||
|
|
||||||
|
let cityText = response.data.city;
|
||||||
|
let cityValue = $("#city option").filter(function () {
|
||||||
|
return $(this).text().trim() === cityText.trim();
|
||||||
|
}).val();
|
||||||
|
|
||||||
|
if (cityValue) {
|
||||||
|
$('#city').val(cityValue).trigger('change');
|
||||||
|
} else {
|
||||||
|
console.warn("شهرستان", cityText);
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
$('#address').val(response.data.address);
|
||||||
|
// ************ Infos for Step 2 ************
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$('.alert-msg').show();
|
||||||
|
$('.alert-msg p').text(response.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-msg').hide();
|
||||||
|
$('.alert-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
console.error("خطا در ajax.post:", err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
$(document).ready(function () {
|
||||||
|
$(".select2Option").select2({
|
||||||
|
language: "fa",
|
||||||
|
dir: "rtl"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async function checkInputsStep2() {
|
||||||
|
let state = $("#state").val().trim();
|
||||||
|
let city = $("#city").val();
|
||||||
|
let address = $("#address").val().trim();
|
||||||
|
|
||||||
|
if (!state || city === "0" || !address) {
|
||||||
|
if (state === "" && city === "0" && address === "") {
|
||||||
|
validateField('.validControl', 'لطفاً اطلاعات استان، شهر و آدرس را پر نمایید', 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state === "") {
|
||||||
|
validateField(".stateValidate", "لطفا نام استان را وارد نمایید", 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (city === "0") {
|
||||||
|
validateField(".cityValidate", "لطفا نام شهر را وارد نمایید", 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (address === "" || address.length <= 3) {
|
||||||
|
validateField("#address", "لطفا آدرس را وارد نمایید", 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const commandStep2 = {
|
||||||
|
id: $("#contractPartyId").val(),
|
||||||
|
state: state,
|
||||||
|
city: $("#city option:selected").text(),
|
||||||
|
address: address
|
||||||
|
};
|
||||||
|
|
||||||
|
var btnDisable = $('.stepNext').addClass('disable');
|
||||||
|
var loading = $('.stepNext .loading').show();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await ajax.post(updateAddressUrl, commandStep2, true);
|
||||||
|
if (response.success) {
|
||||||
|
$('.alert-success-msg').show();
|
||||||
|
$('.alert-success-msg p').text(response.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-success-msg').hide();
|
||||||
|
$('.alert-success-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
|
||||||
|
loadWorkshopData($("#contractPartyId").val());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$('.alert-msg').show();
|
||||||
|
$('.alert-msg p').text(response.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-msg').hide();
|
||||||
|
$('.alert-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
console.error("خطا در ajax.post:", err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,692 @@
|
|||||||
|
var sumAmountArray = [];
|
||||||
|
var command = {
|
||||||
|
workshops: []
|
||||||
|
};
|
||||||
|
let totalPrice = 0;
|
||||||
|
var workshopDataId = 0;
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
var $inputs = $('.operations-btns input');
|
||||||
|
|
||||||
|
$(".select2Option").select2({
|
||||||
|
language: "fa",
|
||||||
|
dir: "rtl"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('input', '.operations-btns input[type="text"]', function() {
|
||||||
|
let $input = $(this);
|
||||||
|
let nameSpan = $input.closest(".accordion-item").find('.workshopListItem .workshopNameSpan');
|
||||||
|
nameSpan.text($input.val());
|
||||||
|
updateAddButtonText();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('change', ".operations-btns select", function () {
|
||||||
|
let $input = $(this);
|
||||||
|
let numberSpan = $input.closest(".accordion-item").find('.workshopListItem .numberSpan');
|
||||||
|
numberSpan.text($input.val());
|
||||||
|
updateAddButtonText();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('change', '.btnRadioContainer .radioOption', updateAddButtonText);
|
||||||
|
|
||||||
|
$(document).on("click", ".btnAdd", function () {
|
||||||
|
let $currentWorkshop = $(".accordion-item").last();
|
||||||
|
|
||||||
|
let allInputsFilled = true;
|
||||||
|
let atLeastOneChecked = false;
|
||||||
|
|
||||||
|
$currentWorkshop.find('.operations-btns input[type="text"]').each(function () {
|
||||||
|
if ($(this).val().trim() === "") {
|
||||||
|
allInputsFilled = false;
|
||||||
|
validateField($(this), "ابتدا اطلاعات کارگاه را وارد نمائید", 3500);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
workshopName = $(this).val().trim();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$currentWorkshop.find('.btnRadioContainer .radioOption').each(function () {
|
||||||
|
if ($(this).prop('checked')) {
|
||||||
|
atLeastOneChecked = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!atLeastOneChecked) {
|
||||||
|
validateField($currentWorkshop.find('.btnRadioContainer .radioOption').first(), "حداقل یکی از گزینه های سرویس را انتخاب کنید", 3500);
|
||||||
|
}
|
||||||
|
|
||||||
|
addNewWorkshop();
|
||||||
|
updateAddButtonText();
|
||||||
|
});
|
||||||
|
|
||||||
|
function addNewWorkshop() {
|
||||||
|
workshopDataId = workshopDataId + 1;
|
||||||
|
var workshopHtml = `<div class="accordion-item" data-id="new_${workshopDataId}" data-new="true">
|
||||||
|
<div class="workshopListItem">
|
||||||
|
<div class="titleWP">
|
||||||
|
<span class="workshopNameSpan"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center justify-content-end gap-3">
|
||||||
|
<div class="badgeWP">
|
||||||
|
<span class="numberSpan">25</span>
|
||||||
|
<span>نفر</span>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="totalPayWP">
|
||||||
|
<span id="totalPay_new_${workshopDataId}">-</span>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-end">
|
||||||
|
<button type="button" class="btnRemove">
|
||||||
|
<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="M6.875 11H15.125" stroke="white"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="openBtnWP">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="operations-btns">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-12 col-md-9 col-lg-8 col-xl-10">
|
||||||
|
<div class="d-flex align-items-end gap-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="titleInfoWP">
|
||||||
|
نام مجموعه (کارگاه)
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control workshop-form-control mt-1" id="workshopName" placeholder="نام کارگاه را وارد کنید">
|
||||||
|
</div>
|
||||||
|
<div class="form-group d-block d-md-flex align-items-center gap-2">
|
||||||
|
<span class="titleInfoWP">
|
||||||
|
تعداد پرسنل:
|
||||||
|
</span>
|
||||||
|
<select class="form-control text-center select2Option_new_${workshopDataId}" id="numberPersonnel_new_${workshopDataId}">
|
||||||
|
<option value="25">25</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
<option value="150">150</option>
|
||||||
|
<option value="200">200</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mt-2">
|
||||||
|
<div class="titleInfoWP">
|
||||||
|
انتخاب سرویس
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-block d-md-flex mt-1">
|
||||||
|
<div class="btnRadioContainer">
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="ContractAndCheckout_new_${workshopDataId}" value="true" name="contractAndCheckout_new_${workshopDataId}" class="radioOption">
|
||||||
|
<label for="ContractAndCheckout_new_${workshopDataId}" class="radioLabelListOption outlineDate">قراداد و تصفیه حساب</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="Insurance_new_${workshopDataId}" value="true" name="insurance_new_${workshopDataId}" class="radioOption">
|
||||||
|
<label for="Insurance_new_${workshopDataId}" class="radioLabelListOption outlineDate">ارسال لیست بیمه</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="RollCall_new_${workshopDataId}" value="true" name="rollCall_new_${workshopDataId}" class="radioOption">
|
||||||
|
<label for="RollCall_new_${workshopDataId}" class="radioLabelListOption outlineDate">ساعت حضور و غیاب</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="CustomizeCheckout_new_${workshopDataId}" value="true" name="customizeCheckout_new_${workshopDataId}" class="radioOption">
|
||||||
|
<label for="CustomizeCheckout_new_${workshopDataId}" class="radioLabelListOption outlineDate">فیش حقوقی غیررسمی</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-md-3 col-lg-4 col-xl-2">
|
||||||
|
<div class="totalPaymentWP">
|
||||||
|
<span id="totalPayment_new_${workshopDataId}">-</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
|
||||||
|
$('.accordion').append(workshopHtml);
|
||||||
|
|
||||||
|
$(`.select2Option_new_${workshopDataId}`).select2({
|
||||||
|
language: "fa",
|
||||||
|
dir: "rtl"
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".operations-btns").slideUp(300);
|
||||||
|
$(".openBtnWP").removeClass('expanded');
|
||||||
|
|
||||||
|
let $newAccordionItem = $('.accordion-item').last();
|
||||||
|
let $newOperationsBtns = $newAccordionItem.find(".operations-btns");
|
||||||
|
let $newOpenBtn = $newAccordionItem.find(".openBtnWP");
|
||||||
|
|
||||||
|
// Expand only the new one
|
||||||
|
$newOperationsBtns.slideDown(300);
|
||||||
|
$newOpenBtn.addClass('expanded');
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on("click", ".btnRemove", function () {
|
||||||
|
$(".btnAdd").removeClass('d-none');
|
||||||
|
var dataId = $(this).closest(".accordion-item").data('id');
|
||||||
|
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||||
|
if (existingSumAmount) {
|
||||||
|
sumAmountArray = sumAmountArray.filter(w => w.workshopDataId !== dataId);
|
||||||
|
}
|
||||||
|
sumNumberOfAmount();
|
||||||
|
|
||||||
|
$(this).closest(".accordion-item").remove();
|
||||||
|
|
||||||
|
|
||||||
|
//var currentCount = $('.accordion-item').length;
|
||||||
|
updateAddButtonText();
|
||||||
|
});
|
||||||
|
|
||||||
|
function createOrUpdateCommand() {
|
||||||
|
command = {
|
||||||
|
workshops: []
|
||||||
|
};
|
||||||
|
|
||||||
|
totalPrice = 0;
|
||||||
|
|
||||||
|
$(".accordion-item").each(function() {
|
||||||
|
|
||||||
|
var accordionItem = $(this).closest('.accordion-item');
|
||||||
|
var dataId = accordionItem.data('id');
|
||||||
|
var dataIsNew = accordionItem.data('new');
|
||||||
|
|
||||||
|
let $currentWorkshop = $(this);
|
||||||
|
let workshopName = "";
|
||||||
|
let personnelCount = 0;
|
||||||
|
//let selectedServices = [];
|
||||||
|
let selectedContractAndCheckout = false;
|
||||||
|
let selectedInsurance = false;
|
||||||
|
let selectedRollCall = false;
|
||||||
|
let selectedCustomizeCheckout = false;
|
||||||
|
let allInputsFilled = true;
|
||||||
|
let atLeastOneChecked = false;
|
||||||
|
|
||||||
|
let workshopID = command.workshops.length;
|
||||||
|
|
||||||
|
if (!allInputsFilled) return;
|
||||||
|
|
||||||
|
$currentWorkshop.find('.operations-btns input[type="text"]').each(function() {
|
||||||
|
if ($(this).val() === "") {
|
||||||
|
allInputsFilled = false;
|
||||||
|
validateField($(this), "ابتدا اطلاعات کارگاه را وارد نمائید", 3500);
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
workshopName = $(this).val();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
personnelCount = parseInt($currentWorkshop.find(".operations-btns select").val()) || 0;
|
||||||
|
|
||||||
|
function checkCheckbox(serviceName) {
|
||||||
|
const selector = `.btnRadioContainer #${serviceName}${dataIsNew ? `_` : ''}${dataId}`;
|
||||||
|
const $checkbox = $currentWorkshop.find(selector);
|
||||||
|
if ($checkbox.prop('checked')) {
|
||||||
|
atLeastOneChecked = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedContractAndCheckout = checkCheckbox("ContractAndCheckout");
|
||||||
|
selectedInsurance = checkCheckbox("Insurance");
|
||||||
|
selectedRollCall = checkCheckbox("RollCall");
|
||||||
|
selectedCustomizeCheckout = checkCheckbox("CustomizeCheckout");
|
||||||
|
|
||||||
|
if (!atLeastOneChecked) {
|
||||||
|
validateField($currentWorkshop.find('.btnRadioContainer .radioOption').first(),
|
||||||
|
"حداقل یکی از گزینه های سرویس را انتخاب کنید",
|
||||||
|
3500);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let existingAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||||
|
|
||||||
|
let existingWorkshop = command.workshops.find(w => w.workshopId === workshopID);
|
||||||
|
|
||||||
|
if (existingWorkshop) {
|
||||||
|
existingWorkshop.CountPerson = personnelCount;
|
||||||
|
existingWorkshop.ContractAndCheckout = selectedContractAndCheckout;
|
||||||
|
existingWorkshop.Insurance = selectedInsurance;
|
||||||
|
existingWorkshop.RollCall = selectedRollCall;
|
||||||
|
existingWorkshop.CustomizeCheckout = selectedCustomizeCheckout;
|
||||||
|
if (existingAmount) {
|
||||||
|
existingWorkshop.WorkshopServicesAmount = existingAmount.amount;
|
||||||
|
existingWorkshop.WorkshopServicesAmountStr = existingAmount.amountStr;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
let newWorkshop = {
|
||||||
|
Id: dataIsNew ? 0 : dataId,
|
||||||
|
workshopId: dataId,
|
||||||
|
WorkshopName: workshopName,
|
||||||
|
ContractingPartyTempId: parseInt($('#contractPartyId').val()) || 0,
|
||||||
|
CountPerson: personnelCount,
|
||||||
|
ContractAndCheckout: selectedContractAndCheckout,
|
||||||
|
Insurance: selectedInsurance,
|
||||||
|
RollCall: selectedRollCall,
|
||||||
|
CustomizeCheckout: selectedCustomizeCheckout,
|
||||||
|
ContractAndCheckoutInPerson: false,
|
||||||
|
InsuranceInPerson: false,
|
||||||
|
WorkshopServicesAmount: existingAmount.amount,
|
||||||
|
WorkshopServicesAmountStr: existingAmount.amountStr
|
||||||
|
};
|
||||||
|
command.workshops.push(newWorkshop);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return command;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateAddButtonText() {
|
||||||
|
let allInputsFilled = true;
|
||||||
|
let atLeastOneChecked = false;
|
||||||
|
|
||||||
|
$(".accordion-item").each(function () {
|
||||||
|
let $workshop = $(this);
|
||||||
|
let isFilled = true;
|
||||||
|
let isChecked = false;
|
||||||
|
atLeastOneChecked = false;
|
||||||
|
|
||||||
|
$workshop.find('.operations-btns input[type="text"]').each(function () {
|
||||||
|
if ($(this).val().trim() === "") {
|
||||||
|
isFilled = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$workshop.find('.btnRadioContainer .radioOption').each(function () {
|
||||||
|
if ($(this).prop('checked')) {
|
||||||
|
isChecked = true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!isFilled) allInputsFilled = false;
|
||||||
|
if (isChecked) atLeastOneChecked = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (allInputsFilled && atLeastOneChecked) {
|
||||||
|
$('.btnAdd').prop('disabled', false).removeClass('disable');
|
||||||
|
$('#nextStep3').prop('disabled', false).removeClass('disable');
|
||||||
|
} else {
|
||||||
|
$('.btnAdd').prop('disabled', true).addClass('disable');
|
||||||
|
$('#nextStep3').prop('disabled', true).addClass('disable');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function checkInputsStep3() {
|
||||||
|
const createOrUpdate = createOrUpdateCommand();
|
||||||
|
|
||||||
|
if (!createOrUpdate || createOrUpdate.workshops.length === 0) {
|
||||||
|
validateField('input', 'لطفاً حداقل اطلاعات کارگاه را پر نمایید', 3500);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
await loadSpecifiedWorkshop();
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
var command = createOrUpdate.workshops;
|
||||||
|
|
||||||
|
let btnDisable = $('.stepNext').addClass('disable');
|
||||||
|
let loading = $('.stepNext .loading').show();
|
||||||
|
|
||||||
|
const responseCreateOrUpdateWorkshop = await ajax.post(createOrUpdateWorkshopTempUrl, { command, contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0 }, true);
|
||||||
|
if (responseCreateOrUpdateWorkshop.success) {
|
||||||
|
$('.alert-success-msg').show();
|
||||||
|
$('.alert-success-msg p').text(responseCreateOrUpdateWorkshop.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-success-msg').hide();
|
||||||
|
$('.alert-success-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
await totalPaymentAndWorkshopList();
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$('.alert-msg').show();
|
||||||
|
$('.alert-msg p').text(responseCreateOrUpdateWorkshop.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-msg').hide();
|
||||||
|
$('.alert-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("خطا در ajax.post:", err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateRemoveButtons() {
|
||||||
|
$(".btnRemove").prop('disabled', true).addClass("disable");
|
||||||
|
$(".btnRemove").last().prop('disabled', false).removeClass("disable");
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('change', '.operations-btns select, .btnRadioContainer .radioOption', function () {
|
||||||
|
const accordionItem = $(this).closest('.accordion-item');
|
||||||
|
const dataId = accordionItem.data('id');
|
||||||
|
const dataIsNew = accordionItem.data('new');
|
||||||
|
|
||||||
|
const $totalPayment = $(`#totalPayment_${dataId}`);
|
||||||
|
const $totalPay = $(`#totalPay_${dataId}`);
|
||||||
|
|
||||||
|
const personnelCount = parseInt($(`#numberPersonnel${dataIsNew ? `_` : ''}${dataId}`).val()) || 0;
|
||||||
|
if (personnelCount === 0) {
|
||||||
|
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||||
|
if (existingSumAmount) {
|
||||||
|
sumAmountArray = sumAmountArray.filter(w => w.workshopDataId !== dataId);
|
||||||
|
}
|
||||||
|
sumNumberOfAmount();
|
||||||
|
$totalPayment.text('-');
|
||||||
|
$totalPay.text('-');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const serviceKeys = ['ContractAndCheckout', 'Insurance', 'RollCall', 'CustomizeCheckout'];
|
||||||
|
const selectedOptions = {};
|
||||||
|
let atLeastOneChecked = false;
|
||||||
|
serviceKeys.forEach(key => {
|
||||||
|
const isChecked = $(`#${key}${dataIsNew ? `_` : ''}${dataId}`).prop('checked');
|
||||||
|
selectedOptions[key] = isChecked;
|
||||||
|
if (isChecked) atLeastOneChecked = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!atLeastOneChecked) {
|
||||||
|
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||||
|
if (existingSumAmount) {
|
||||||
|
sumAmountArray = sumAmountArray.filter(w => w.workshopDataId !== dataId);
|
||||||
|
}
|
||||||
|
sumNumberOfAmount();
|
||||||
|
$totalPayment.text('-');
|
||||||
|
$totalPay.text('-');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var newWorkshopGetAmountCommand = {
|
||||||
|
CountPerson: personnelCount,
|
||||||
|
...selectedOptions
|
||||||
|
};
|
||||||
|
|
||||||
|
ajax.get(institutionPlanForWorkshopUrl, newWorkshopGetAmountCommand, false)
|
||||||
|
.then(response => {
|
||||||
|
console.log(response);
|
||||||
|
|
||||||
|
const amountStr = response.data.onlineAndInPersonSumAmountStr + ' ریال';
|
||||||
|
const amountDouble = response.data.onlineAndInPersonSumAmountDouble || 0;
|
||||||
|
|
||||||
|
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||||
|
if (existingSumAmount) {
|
||||||
|
existingSumAmount.amount = amountDouble;
|
||||||
|
} else {
|
||||||
|
let newSumAmount = {
|
||||||
|
workshopDataId: dataId,
|
||||||
|
amountStr: amountStr,
|
||||||
|
amount: amountDouble
|
||||||
|
};
|
||||||
|
sumAmountArray.push(newSumAmount);
|
||||||
|
}
|
||||||
|
sumNumberOfAmount();
|
||||||
|
$(`#totalPayment_${dataId}`).text(amountStr);
|
||||||
|
$(`#totalPay_${dataId}`).text(amountStr);
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function sumNumberOfAmount() {
|
||||||
|
|
||||||
|
var sumAllAmount = 0;
|
||||||
|
|
||||||
|
sumAmountArray.forEach(item => {
|
||||||
|
sumAllAmount += item.amount;
|
||||||
|
});
|
||||||
|
var formatted = formatNumber(sumAllAmount);
|
||||||
|
$('#totalSumDisplay').text(formatted + ' ریال');
|
||||||
|
}
|
||||||
|
function formatNumber(number) {
|
||||||
|
return Math.round(number)
|
||||||
|
.toString()
|
||||||
|
.replace(/\B(?=(\d{3})+(?!\d))/g, '٬');
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadWorkshopData(id) {
|
||||||
|
var html = ``;
|
||||||
|
ajax.get(getWorkshopTempUrl, { contractingPartyId: id }, true)
|
||||||
|
.then(response => {
|
||||||
|
if (response.data.length > 0) {
|
||||||
|
response.data.forEach(function(item, index) {
|
||||||
|
html += `<div class="accordion-item" id="workshop_${item.id}" data-id="${item.id}" data-new="false">
|
||||||
|
<div class="workshopListItem">
|
||||||
|
<div class="titleWP">
|
||||||
|
<span class="workshopNameSpan">${item.workshopName}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center justify-content-end gap-3">
|
||||||
|
<div class="badgeWP">
|
||||||
|
<span class="numberSpan">${item.countPerson}</span>
|
||||||
|
<span>نفر</span>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="totalPayWP">
|
||||||
|
<span id="totalPay_${item.id}">${item.workshopServicesAmountStr} ریال</span>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-end ${index === 0 ? `disable`: ``}">
|
||||||
|
<button type="button" class="btnRemove ${index === 0 ? `disable`: ``}" ${index === 0 ? `disabled`: ``}>
|
||||||
|
<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="M6.875 11H15.125" stroke="white"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="openBtnWP">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="operations-btns" style="display: ${response.data.length === index+1 ? `block` : `none`}"">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-12 col-md-9 col-lg-8 col-xl-10">
|
||||||
|
<div class="d-flex align-items-end gap-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="titleInfoWP">
|
||||||
|
نام مجموعه (کارگاه)
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control workshop-form-control mt-1" id="workshopName" value="${item.workshopName}" placeholder="نام کارگاه را وارد کنید">
|
||||||
|
</div>
|
||||||
|
<div class="form-group d-block d-md-flex align-items-center gap-2">
|
||||||
|
<span class="titleInfoWP">
|
||||||
|
تعداد پرسنل:
|
||||||
|
</span>
|
||||||
|
<select class="form-control text-center select2Option" id="numberPersonnel${item.id}">
|
||||||
|
<option value="25">25</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
<option value="150">150</option>
|
||||||
|
<option value="200">200</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mt-2">
|
||||||
|
<div class="titleInfoWP">
|
||||||
|
انتخاب سرویس
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-block d-md-flex mt-1">
|
||||||
|
<div class="btnRadioContainer">
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="ContractAndCheckout${item.id}" value="true" name="contractAndCheckout" class="radioOption" ${item.contractAndCheckout ? 'checked' : ''}>
|
||||||
|
<label for="ContractAndCheckout${item.id}" class="radioLabelListOption outlineDate">قرارداد و تصفیه حساب</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="Insurance${item.id}" value="true" name="insurance" class="radioOption" ${item.insurance ? 'checked' : ''}>
|
||||||
|
<label for="Insurance${item.id}" class="radioLabelListOption outlineDate">ارسال لیست بیمه</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="RollCall${item.id}" value="true" name="rollCall" class="radioOption" ${item.rollCall ? 'checked' : ''}>
|
||||||
|
<label for="RollCall${item.id}" class="radioLabelListOption outlineDate">ساعت حضور و غیاب</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="CustomizeCheckout${item.id}" value="true" name="customizeCheckout" class="radioOption" ${item.customizeCheckout ? 'checked' : ''}>
|
||||||
|
<label for="CustomizeCheckout${item.id}" class="radioLabelListOption outlineDate">فیش حقوقی غیررسمی</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-md-3 col-lg-4 col-xl-2">
|
||||||
|
<div class="totalPaymentWP">
|
||||||
|
<span id="totalPayment_${item.id}">${item.workshopServicesAmountStr}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
var itemOfWorkshops = {
|
||||||
|
Id: item.id,
|
||||||
|
workshopId: item.id,
|
||||||
|
WorkshopName: item.workshopName,
|
||||||
|
ContractingPartyTempId: item.contractingPartyTempId,
|
||||||
|
CountPerson: item.countPerson,
|
||||||
|
ContractAndCheckout: item.contractAndCheckout,
|
||||||
|
Insurance: item.insurance,
|
||||||
|
RollCall: item.rollCall,
|
||||||
|
CustomizeCheckout: item.customizeCheckout,
|
||||||
|
ContractAndCheckoutInPerson: item.contractAndCheckoutInPerson,
|
||||||
|
InsuranceInPerson: item.insuranceInPerson,
|
||||||
|
WorkshopServicesAmount: item.workshopServicesAmount,
|
||||||
|
WorkshopServicesAmountStr: item.workshopServicesAmountStr
|
||||||
|
};
|
||||||
|
command.workshops.push(itemOfWorkshops);
|
||||||
|
|
||||||
|
var itemOfAmount = {
|
||||||
|
workshopDataId: item.id,
|
||||||
|
amountStr: item.workshopServicesAmountStr,
|
||||||
|
amount: item.workshopServicesAmount
|
||||||
|
};
|
||||||
|
sumAmountArray.push(itemOfAmount);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
html += `<div class="accordion-item" id="workshop_0" data-id="new_0" data-new="true">
|
||||||
|
<div class="workshopListItem">
|
||||||
|
<div class="titleWP">
|
||||||
|
<span class="workshopNameSpan"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-flex align-items-center justify-content-end gap-3">
|
||||||
|
<div class="badgeWP">
|
||||||
|
<span class="numberSpan">25</span>
|
||||||
|
<span>نفر</span>
|
||||||
|
</div>
|
||||||
|
<div class="divider"></div>
|
||||||
|
<div class="totalPayWP">
|
||||||
|
<span id="totalPay_new_0">-</span>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-end disable">
|
||||||
|
<button type="button" class="btnRemove disable" disabled>
|
||||||
|
<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="M6.875 11H15.125" stroke="white"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="openBtnWP">
|
||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="operations-btns" style="display: block">
|
||||||
|
<div class="row align-items-center">
|
||||||
|
<div class="col-12 col-md-9 col-lg-8 col-xl-10">
|
||||||
|
<div class="d-flex align-items-end gap-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="titleInfoWP">
|
||||||
|
نام مجموعه (کارگاه)
|
||||||
|
</div>
|
||||||
|
<input type="text" class="form-control workshop-form-control mt-1" id="workshopName" placeholder="نام کارگاه را وارد کنید">
|
||||||
|
</div>
|
||||||
|
<div class="form-group d-block d-md-flex align-items-center gap-2">
|
||||||
|
<span class="titleInfoWP">
|
||||||
|
تعداد پرسنل:
|
||||||
|
</span>
|
||||||
|
<select class="form-control text-center select2Option" id="numberPersonnel_new_0">
|
||||||
|
<option value="25">25</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100">100</option>
|
||||||
|
<option value="150">150</option>
|
||||||
|
<option value="200">200</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group mt-2">
|
||||||
|
<div class="titleInfoWP">
|
||||||
|
انتخاب سرویس
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-block d-md-flex mt-1">
|
||||||
|
<div class="btnRadioContainer">
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="ContractAndCheckout_new_0" value="true" name="contractAndCheckout" class="radioOption">
|
||||||
|
<label for="ContractAndCheckout_new_0" class="radioLabelListOption outlineDate">قراداد و تصفیه حساب</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="Insurance_new_0" value="true" name="insurance" class="radioOption">
|
||||||
|
<label for="Insurance_new_0" class="radioLabelListOption outlineDate">ارسال لیست بیمه</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="RollCall_new_0" value="true" name="rollCall" class="radioOption">
|
||||||
|
<label for="RollCall_new_0" class="radioLabelListOption outlineDate">ساعت حضور و غیاب</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="CustomizeCheckout_new_0" value="true" name="customizeCheckout" class="radioOption">
|
||||||
|
<label for="CustomizeCheckout_new_0" class="radioLabelListOption outlineDate">فیش حقوقی غیررسمی</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 col-md-3 col-lg-4 col-xl-2">
|
||||||
|
<div class="totalPaymentWP">
|
||||||
|
<span id="totalPayment_new_0">-</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#accordionHtml').html(html);
|
||||||
|
|
||||||
|
if (command.workshops.length > 0) {
|
||||||
|
command.workshops.forEach(function(item) {
|
||||||
|
$(`#numberPersonnel${item.Id}`).select2();
|
||||||
|
$(`#numberPersonnel${item.Id}`).val(item.CountPerson).trigger('change');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$(`#numberPersonnel_new_0`).select2();
|
||||||
|
$(`#numberPersonnel_new_0`).val("25").trigger('change');
|
||||||
|
}
|
||||||
|
|
||||||
|
sumNumberOfAmount();
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
$(document).ready(function () {
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
async function loadSpecifiedWorkshop() {
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
if (command.workshops.length > 0) {
|
||||||
|
command.workshops.forEach(function(item) {
|
||||||
|
html += `<div class="cardGrid">
|
||||||
|
<div class="d-flex align-items-center justify-content-between">
|
||||||
|
<div class="titleWpName">نام کارگاه : <span>${item.WorkshopName}</span></div>
|
||||||
|
<div class="titleWpPrice">ریال ${item.WorkshopServicesAmountStr}</div>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex align-items-center justify-content-between">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-block d-md-flex mt-3">
|
||||||
|
<div class="btnCheckContainer w-100">
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="oneDis" value="1" name="checkDo" class="checkOption" ${
|
||||||
|
item.ContractAndCheckout ? "checked" : ''} disabled="disabled">
|
||||||
|
<label for="oneDis" class="checkLabelListOption">
|
||||||
|
<span>قراداد و تصفیه حساب</span>
|
||||||
|
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="11.4997" cy="11.5007" r="7.66667" fill="#84CC16"/>
|
||||||
|
<path d="M9.10449 11.5007L10.9151 13.3113C10.9737 13.3698 11.0686 13.3698 11.1272 13.3113L14.8545 9.58398" stroke="white" stroke-width="1.2" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="twoDis" value="2" name="checkDo" class="checkOption" ${
|
||||||
|
item.Insurance ? "checked" : ''} disabled="disabled">
|
||||||
|
<label for="twoDis" class="checkLabelListOption">
|
||||||
|
<span>ارسال لیست بیمه</span>
|
||||||
|
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="11.4997" cy="11.5007" r="7.66667" fill="#84CC16"/>
|
||||||
|
<path d="M9.10449 11.5007L10.9151 13.3113C10.9737 13.3698 11.0686 13.3698 11.1272 13.3113L14.8545 9.58398" stroke="white" stroke-width="1.2" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="threeDis" value="3" name="checkDo" class="checkOption" ${
|
||||||
|
item.RollCall ? "checked" : ''} disabled="disabled">
|
||||||
|
<label for="threeDis" class="checkLabelListOption">
|
||||||
|
<span>ساعت حضور و غیاب</span>
|
||||||
|
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="11.4997" cy="11.5007" r="7.66667" fill="#84CC16"/>
|
||||||
|
<path d="M9.10449 11.5007L10.9151 13.3113C10.9737 13.3698 11.0686 13.3698 11.1272 13.3113L14.8545 9.58398" stroke="white" stroke-width="1.2" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="fourDis" value="4" name="checkDo" class="checkOption" ${
|
||||||
|
item.CustomizeCheckout ? "checked" : ''} disabled="disabled">
|
||||||
|
<label for="fourDis" class="checkLabelListOption">
|
||||||
|
<span>فیش حقوقی غیررسمی</span>
|
||||||
|
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<circle cx="11.4997" cy="11.5007" r="7.66667" fill="#84CC16"/>
|
||||||
|
<path d="M9.10449 11.5007L10.9151 13.3113C10.9737 13.3698 11.0686 13.3698 11.1272 13.3113L14.8545 9.58398" stroke="white" stroke-width="1.2" stroke-linecap="round"/>
|
||||||
|
</svg>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#cardSelected').html(html);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function totalPaymentAndWorkshopList() {
|
||||||
|
ajax.get(totalPaymentAndWorkshopListUrl, { contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0 })
|
||||||
|
.then(response => {
|
||||||
|
$(`#sumOfWorkshopsPaymentPayment`).text(response.data.withoutTaxPaymentStr + " ریال");
|
||||||
|
$(`#valueAddedTaxSt`).text(response.data.valueAddedTaxSt + " ریال");
|
||||||
|
$(`#totalPaymentStr`).text(response.data.totalPaymentStr + " ریال");
|
||||||
|
|
||||||
|
$(`#sumOfWorkshopsPaymentPaymentStep5`).text(response.data.withoutTaxPaymentStr + " ریال");
|
||||||
|
$(`#valueAddedTaxStStep5`).text(response.data.valueAddedTaxSt + " ریال");
|
||||||
|
$(`#totalPaymentStrStep5`).text(response.data.totalPaymentStr + " ریال");
|
||||||
|
|
||||||
|
$(`#totalPaymentDoubleInput`).val(response.data.totalPaymentDouble);
|
||||||
|
$(`#valueAddedTaxDoubleInput`).val(response.data.valueAddedTaxDouble);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//$(document).on('change', '.btnCheckContainer .checkOption', createOrUpdateCommand);
|
||||||
|
|
||||||
|
async function checkInputsStep4() {
|
||||||
|
let btnDisable = $('.stepNext').addClass('disable');
|
||||||
|
let loading = $('.stepNext .loading').show();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await ajax.post(createOrUpdateInstitutionContractTemp,
|
||||||
|
{
|
||||||
|
contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0,
|
||||||
|
periodModel: "12",
|
||||||
|
paymentModel: "OneTime",
|
||||||
|
totalPayment: Number($('#totalPaymentDoubleInput').val()),
|
||||||
|
valueAddedTax: Number($('#valueAddedTaxDoubleInput').val())
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
$('.alert-success-msg').show();
|
||||||
|
$('.alert-success-msg p').text(response.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-success-msg').hide();
|
||||||
|
$('.alert-success-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
$('.alert-msg').show();
|
||||||
|
$('.alert-msg p').text(response.message);
|
||||||
|
setTimeout(() => {
|
||||||
|
$('.alert-msg').hide();
|
||||||
|
$('.alert-msg p').text('');
|
||||||
|
}, 3500);
|
||||||
|
btnDisable.removeClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("خطا در ajax.post:", err);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function step4Action() {
|
||||||
|
loadWorkshopData($("#contractPartyId").val());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#priceStatic').on('click', function () {
|
||||||
|
$('#priceStepContainer').hide();
|
||||||
|
$('#priceStep').removeClass('active');
|
||||||
|
$(this).addClass('active');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#priceStep').on('click', function () {
|
||||||
|
$('#priceStepContainer').fadeIn();
|
||||||
|
$('#priceStatic').removeClass('active');
|
||||||
|
$(this).addClass('active');
|
||||||
|
});
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
var codeReg = "";
|
||||||
|
let countdownTimer;
|
||||||
|
let timerDuration = 120; // 2 دقیقه
|
||||||
|
let currentTime = timerDuration;
|
||||||
|
|
||||||
|
$('.codeInputRegister').on('keyup keypress', function (e) {
|
||||||
|
var keyCode = e.keyCode || e.which;
|
||||||
|
this.value = this.value.replace(/[^\d]/, '');
|
||||||
|
|
||||||
|
//if (keyCode === 13) {
|
||||||
|
// $('#getCodeRegisterToPayFinal').click();
|
||||||
|
//}
|
||||||
|
|
||||||
|
////کلید دمکه بک اسپیس 8
|
||||||
|
if (keyCode === 8) {
|
||||||
|
let index_next = $(this).attr("data-next");
|
||||||
|
if (index_next === "end") {
|
||||||
|
$('#reg4').focus();
|
||||||
|
$('#reg4').select();
|
||||||
|
} else if (index_next === "5") {
|
||||||
|
$('#reg3').focus();
|
||||||
|
$('#reg3').select();
|
||||||
|
} else if (index_next === "4") {
|
||||||
|
$('#reg2').focus();
|
||||||
|
$('#reg2').select();
|
||||||
|
} else if (index_next === "3") {
|
||||||
|
$('#reg1').focus();
|
||||||
|
$('#reg1').select();
|
||||||
|
} else if (index_next === "2") {
|
||||||
|
$('#reg0').focus();
|
||||||
|
$('#reg0').select();
|
||||||
|
} else if (index_next === "1") {
|
||||||
|
$('#reg0').focus();
|
||||||
|
$('#reg0').select();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.value.length === this.maxLength) {
|
||||||
|
let next = $(this).data('next');
|
||||||
|
$('#reg' + next).focus();
|
||||||
|
$('#reg' + next).select();
|
||||||
|
}
|
||||||
|
|
||||||
|
//وقتی کد ورودی وارد شد، اتوماتیک ورود میشود
|
||||||
|
if ($('#reg0').val() && $('#reg1').val() && $('#reg2').val() && $('#reg3').val() && $('#reg4').val() && $('#reg5').val()) {
|
||||||
|
//$('#btn-login-code').trigger('click');
|
||||||
|
codeReg = $('#reg0').val() + $('#reg1').val() + $('#reg2').val() + $('#reg3').val() + $('#reg4').val() + $('#reg5').val();
|
||||||
|
//$('#getCodeRegisterToPayFinal').click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$('#getCodeRegisterToPay').on('click', async function () {
|
||||||
|
$(".otpRegister").removeClass('disable');
|
||||||
|
|
||||||
|
const commandStep5 = {
|
||||||
|
contractingPartyId: $("#contractPartyId").val()
|
||||||
|
};
|
||||||
|
|
||||||
|
let loading = $(this).find(".loading").show();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await ajax.post(receivedCodeFromServerUrl, commandStep5, true);
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
$('.alert-success-msg').show().find('p').text(response.message);
|
||||||
|
setTimeout(() => $('.alert-success-msg').hide(), 3500);
|
||||||
|
|
||||||
|
$(".otpRegister").removeClass('disable');
|
||||||
|
$(this).hide();
|
||||||
|
loading.hide();
|
||||||
|
$('#getCodeRegisterToPayFinal').show();
|
||||||
|
|
||||||
|
|
||||||
|
$(".otpRegister input").prop('disabled', false);
|
||||||
|
$('#reg0').focus();
|
||||||
|
$('#reg0').select();
|
||||||
|
$('#timerContainer').show();
|
||||||
|
//var hashPhoneNumber = globalPhone.replace(/(\d{2})\d{6}(\d{2})/, '$1******$2');
|
||||||
|
var hashPhoneNumber = globalPhone.slice(-2) + '*******' + globalPhone.slice(0, 2);
|
||||||
|
let messagePhoneNumber = `کد تأیید ثبتنام به شماره ${hashPhoneNumber} ارسال شد. لطفاً کد را در بخش مربوطه وارد کنید.`;
|
||||||
|
$('#messagePhoneNumber').text(messagePhoneNumber);
|
||||||
|
|
||||||
|
startTimer();
|
||||||
|
} else {
|
||||||
|
$('.alert-msg').show().find('p').text(response.message);
|
||||||
|
setTimeout(() => $('.alert-msg').hide(), 3500);
|
||||||
|
$(".otpRegister input").prop('disabled', true);
|
||||||
|
$(".otpRegister").addClass('disable');
|
||||||
|
loading.hide();
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("خطا در ajax.post:", err);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#getCodeRegisterToPayFinal').on('click', async function () {
|
||||||
|
if (codeReg.length === 6) {
|
||||||
|
const commandVerify = {
|
||||||
|
verifyCode: codeReg,
|
||||||
|
contractingPartyTempId: $("#contractPartyId").val()
|
||||||
|
};
|
||||||
|
|
||||||
|
let loading = $(this).find(".loading").show();
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await ajax.post(checkVerifyCodeIsTrueUrl, commandVerify, true);
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
//window.location.href = "/PaymentPage";
|
||||||
|
$('.alert-success-msg').show().find('p').text(response.message);
|
||||||
|
setTimeout(() => $('.alert-msg').hide(), 3500);
|
||||||
|
alert("صفحه درگاه");
|
||||||
|
loading.hide();
|
||||||
|
} else {
|
||||||
|
$('.alert-msg').show().find('p').text(response.message);
|
||||||
|
setTimeout(() => $('.alert-msg').hide(), 3500);
|
||||||
|
loading.hide();
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("خطا در تایید کد:", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function startTimer() {
|
||||||
|
clearInterval(countdownTimer);
|
||||||
|
currentTime = timerDuration;
|
||||||
|
updateTimerDisplay();
|
||||||
|
|
||||||
|
countdownTimer = setInterval(() => {
|
||||||
|
currentTime--;
|
||||||
|
updateTimerDisplay();
|
||||||
|
|
||||||
|
if (currentTime <= 0) {
|
||||||
|
clearInterval(countdownTimer);
|
||||||
|
$('#getCodeRegisterToPayFinal').hide();
|
||||||
|
$('#getCodeRegisterToPay').show();
|
||||||
|
$('#timerContainer').hide();
|
||||||
|
$(".otpRegister input").val('');
|
||||||
|
$(".otpRegister input").prop('disabled', true);
|
||||||
|
$(".otpRegister").addClass('disable');
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateTimerDisplay() {
|
||||||
|
const minutes = String(Math.floor(currentTime / 60)).padStart(2, '0');
|
||||||
|
const seconds = String(currentTime % 60).padStart(2, '0');
|
||||||
|
$('#timerText').text(`${minutes}:${seconds}`);
|
||||||
|
}
|
||||||
96
ServiceHost/wwwroot/AssetsMain/css/fontiran.css
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Name: IRANYekanX Fonts
|
||||||
|
* Version: 4.0
|
||||||
|
* Author: Moslem Ebrahimi (moslemebrahimi.com)
|
||||||
|
* Created on: Aug 02, 2022
|
||||||
|
* Updated on: Aug 02, 2022
|
||||||
|
* Website: http://fontiran.com
|
||||||
|
* Copyright: Commercial/Proprietary Software
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
فونت ایران یکان X یک نرم افزار مالکیتی محسوب می شود. جهت آگاهی از قوانین استفاده از این فونت ها لطفا به وب سایت (فونت ایران دات کام) مراجعه نمایید
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
IRANYekanX fonts are considered a proprietary software. To gain information about the laws regarding the use of these fonts, please visit www.fontiran.com
|
||||||
|
--------------------------------------------------------------------------------------
|
||||||
|
This set of fonts are used in this project under the license: (FWBSD2TG)
|
||||||
|
------------------------------------------------------------------------------------- fonts/-
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 100;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Thin.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Thin.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 200;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-UltraLight.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-UltraLight.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 300;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Light.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Light.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 500;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Medium.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Medium.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 600;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-DemiBold.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-DemiBold.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 800;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-ExtraBold.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-ExtraBold.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 900;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Black.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Black.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 950;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-ExtraBlack.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-ExtraBlack.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 1000;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Heavy.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Heavy.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: bold;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Bold.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Bold.woff2') format('woff2');
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: IRANYekanX;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
src: url('../fonts/iranyekan/woff/IRANYekanX-Regular.woff') format('woff'), url('../fonts/iranyekan/woff2/IRANYekanX-Regular.woff2') format('woff2');
|
||||||
|
}
|
||||||
13
ServiceHost/wwwroot/AssetsMain/css/main.css
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
@import "/AssetsClient/css/fontiran.css";
|
||||||
|
|
||||||
|
*,
|
||||||
|
html {
|
||||||
|
direction: rtl;
|
||||||
|
font-family: 'IRANYekanX', serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
-moz-font-feature-settings: "ss02";
|
||||||
|
-webkit-font-feature-settings: "ss02";
|
||||||
|
font-feature-settings: "ss02";
|
||||||
|
}
|
||||||
1
ServiceHost/wwwroot/AssetsMain/css/styles.css
Normal file
BIN
ServiceHost/wwwroot/AssetsMain/images/enamad_icon.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/enamed-park.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/footer-logo.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/hero-bg-real.jpg
Normal file
|
After Width: | Height: | Size: 366 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/hero-bg.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/hero.png
Normal file
|
After Width: | Height: | Size: 242 KiB |
24
ServiceHost/wwwroot/AssetsMain/images/logo.svg
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<svg width="52" height="60" viewBox="0 0 52 60" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_3708_36720)">
|
||||||
|
<path d="M0 27.3301L10.8676 20.3594V37.7234L26 46.7436L40.8571 37.7234V29.5226H26L40.8571 20.0918H52V44.9666L26 60.0009L0 44.9666V27.3301Z" fill="url(#paint0_linear_3708_36720)"/>
|
||||||
|
<path d="M18.1592 25.6948V15.9905L35.7042 5.4668L43.8212 10.2499L18.1592 25.6948Z" fill="url(#paint1_linear_3708_36720)"/>
|
||||||
|
<path d="M25.8169 0L33.0907 3.96365L0.108887 24.3679V15.3476L25.8169 0Z" fill="url(#paint2_linear_3708_36720)"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_3708_36720" x1="0" y1="40.0464" x2="52" y2="40.0464" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#30C1C1"/>
|
||||||
|
<stop offset="1" stop-color="#087474"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_3708_36720" x1="18.1592" y1="15.5808" x2="43.8212" y2="15.5808" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#30C1C1"/>
|
||||||
|
<stop offset="1" stop-color="#087474"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint2_linear_3708_36720" x1="0.108887" y1="12.1843" x2="33.0907" y2="12.1843" gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#30C1C1"/>
|
||||||
|
<stop offset="1" stop-color="#087474"/>
|
||||||
|
</linearGradient>
|
||||||
|
<clipPath id="clip0_3708_36720">
|
||||||
|
<rect width="52" height="60" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/mobile.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/rectangle-4729.png
Normal file
|
After Width: | Height: | Size: 315 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/rectangle-4730.png
Normal file
|
After Width: | Height: | Size: 305 KiB |
BIN
ServiceHost/wwwroot/AssetsMain/images/web-goz.png
Normal file
|
After Width: | Height: | Size: 64 KiB |