SchemeTab, create scheme , scheme list
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Company.Domain.ClassificationSchemeAgg;
|
||||
|
||||
public interface IClassificationSchemeRepository : IRepository<long, ClassificationScheme>
|
||||
{
|
||||
/// <summary>
|
||||
/// پارشیال صفحه ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="worskhopId"></param>
|
||||
/// <returns></returns>
|
||||
Task<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateClassificationScheme(CreateClassificationScheme command);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
/// <summary>
|
||||
/// پارشیال صفحه ایجاد طرح
|
||||
/// </summary>
|
||||
public class ClassificationSchemePartialModel
|
||||
{
|
||||
/// <summary>
|
||||
/// آیا طرح دارد
|
||||
/// </summary>
|
||||
public bool HasScheme { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست طرح
|
||||
/// </summary>
|
||||
public List<EditClassificationScheme> ClassificationSchemesList { get; set; }
|
||||
}
|
||||
@@ -10,14 +10,28 @@ public class CreateClassificationScheme
|
||||
{
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime IncludingDateGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شمول طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string IncludingDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ExecutionDateGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ اجرای طرح
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ExecutionDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان طرح
|
||||
/// </summary>
|
||||
|
||||
@@ -9,6 +9,13 @@ namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
/// </summary>
|
||||
public interface IClassificationSchemeApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// پارشیال صفحه ایجاد طرح
|
||||
/// </summary>
|
||||
/// <param name="worskhopId"></param>
|
||||
/// <returns></returns>
|
||||
Task<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId);
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class ClassificationSchemeApplication : IClassificationSchemeApplication
|
||||
{
|
||||
private readonly IClassificationSchemeRepository _classificationSchemeRepository;
|
||||
|
||||
public ClassificationSchemeApplication(IClassificationSchemeRepository classificationSchemeRepository)
|
||||
{
|
||||
_classificationSchemeRepository = classificationSchemeRepository;
|
||||
}
|
||||
|
||||
public Task<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId)
|
||||
{
|
||||
return _classificationSchemeRepository.ClassificationSchemePartialModel(workshopId);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> CreateClassificationScheme(CreateClassificationScheme command)
|
||||
{
|
||||
var op = new OperationResult();
|
||||
|
||||
try
|
||||
{
|
||||
command.ExecutionDateGr = command.ExecutionDateFa.ToGeorgianDateTime();
|
||||
command.IncludingDateGr = command.IncludingDateFa.ToGeorgianDateTime();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return op.Failed("تاریخ به درستی وارد نشده است");
|
||||
}
|
||||
#region Validation
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
var create = new ClassificationScheme(command.IncludingDateGr, command.ExecutionDateGr,
|
||||
command.DesignerFullName, command.DesignerPhone, command.WorkshopId, command.TypeOfCoefficient);
|
||||
_classificationSchemeRepository.Create(create);
|
||||
await _classificationSchemeRepository.SaveChangesAsync();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public Task<OperationResult> EditClassificationScheme(EditClassificationScheme command)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<OperationResult> CreateGroupJobs(CreateClassificationGroup command)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<OperationResult> CreateGroupSalaryAndCoefficient(CreateClassificationGroupSalaryAndRialCoefficient command)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository;
|
||||
|
||||
public class ClassificationSchemeRepository :RepositoryBase<long, ClassificationScheme>, IClassificationSchemeRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public ClassificationSchemeRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<ClassificationSchemePartialModel> ClassificationSchemePartialModel(long workshopId)
|
||||
{
|
||||
var hasScheme =await _context.ClassificationSchemes.AnyAsync(x => x.WorkshopId == workshopId);
|
||||
if (!hasScheme)
|
||||
return new ClassificationSchemePartialModel()
|
||||
{
|
||||
HasScheme = false,
|
||||
|
||||
};
|
||||
|
||||
var schemeList = _context.ClassificationSchemes.Where(x => x.WorkshopId == workshopId).Select(x =>
|
||||
new EditClassificationScheme()
|
||||
{
|
||||
|
||||
Id = x.id,
|
||||
WorkshopId = x.WorkshopId,
|
||||
IncludingDateGr = x.IncludingDateGr,
|
||||
ExecutionDateGr = x.ExecutionDateGr,
|
||||
EndSchemeDateGr = x.EndSchemeDateGr,
|
||||
IncludingDateFa = x.IncludingDateGr.ToFarsi(),
|
||||
ExecutionDateFa = x.ExecutionDateGr.ToFarsi(),
|
||||
DesignerFullName = x.DesignerFullName,
|
||||
DesignerPhone = x.DesignerPhone,
|
||||
TypeOfCoefficient = x.TypeOfCoefficient
|
||||
|
||||
}).ToListAsync();
|
||||
return new ClassificationSchemePartialModel()
|
||||
{
|
||||
HasScheme = true,
|
||||
WorkshopId = workshopId,
|
||||
ClassificationSchemesList = schemeList.GetAwaiter().GetResult()
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
public Task<OperationResult> CreateClassificationScheme(CreateClassificationScheme command)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
}
|
||||
@@ -209,10 +209,12 @@ using Company.Domain.ContactUsAgg;
|
||||
using CompanyManagment.App.Contracts.ContactUs;
|
||||
using Company.Domain.EmployeeAuthorizeTempAgg;
|
||||
using Company.Domain.AdminMonthlyOverviewAgg;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using Company.Domain.ContractingPartyBankAccountsAgg;
|
||||
using Company.Domain.PaymentInstrumentAgg;
|
||||
using Company.Domain.PaymentTransactionAgg;
|
||||
using CompanyManagment.App.Contracts.AdminMonthlyOverview;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using CompanyManagment.App.Contracts.ContractingPartyBankAccounts;
|
||||
using CompanyManagment.App.Contracts.PaymentInstrument;
|
||||
using CompanyManagment.App.Contracts.PaymentTransaction;
|
||||
@@ -493,11 +495,19 @@ public class PersonalBootstrapper
|
||||
|
||||
services.AddTransient<IPlanPercentageRepository, PlanPercentageRepository>();
|
||||
services.AddTransient<IInstitutionPlanApplication, InstitutionPlanApplication>();
|
||||
//=========End Of Main====================================
|
||||
|
||||
//---File Project------------------------------------
|
||||
|
||||
services.AddTransient<IBoardApplication, BoardApplication>();
|
||||
#region ClassificationScheme
|
||||
|
||||
services.AddTransient<IClassificationSchemeApplication, ClassificationSchemeApplication>();
|
||||
services.AddTransient<IClassificationSchemeRepository, ClassificationSchemeRepository>();
|
||||
|
||||
#endregion
|
||||
//=========End Of Main====================================
|
||||
|
||||
//---File Project------------------------------------
|
||||
|
||||
services.AddTransient<IBoardApplication, BoardApplication>();
|
||||
services.AddTransient<IBoardRepository, BoardRepository>();
|
||||
|
||||
services.AddTransient<IFileApplication, FileApplication>();
|
||||
|
||||
@@ -2,6 +2,202 @@
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.Workshops.ClassificationSchemeModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/admintheme/css/workshop-create.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<style>
|
||||
body{
|
||||
background-color: #fefefe;
|
||||
background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%232ebfbf' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.hiddenTab{
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
<h2>طرح طبقه بندی مشاغل</h2>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div style="max-width: 88%;margin: 0 auto;">
|
||||
<div class="col-xs-12" style="float: unset;">
|
||||
<div class="handle-title">
|
||||
<h3 id="titleHead">تنظیمات طرح طبقه بندی مشاغل</h3>
|
||||
<a asp-page="./index" class="btn btn-rounded" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-xs-12" style="float: unset;">
|
||||
<div class="card card-pattern">
|
||||
<ul class="nav nav-tabs nav-fill wizard" id="myTab" role="tablist">
|
||||
|
||||
<li class="li-wizard step active" id="schemeTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=SchemeTab">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon1" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span> لیست طرح </span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="li-wizard step" id="jobsTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=CreateJobs">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon2" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>تعیین مشاغل گروه ها</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="li-wizard step" id="salaiesTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=CreateSalaries">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon2" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>تعیین دستمزد گروه ها</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="li-wizard step" id="addEmployeesTab" data-url="/Admin/Company/Workshops/ClassificationScheme?handler=AddEmployees">
|
||||
<a class="nav-link">
|
||||
<div class="success-icon" id="success-icon3" style="display:none;">
|
||||
<svg width="11" height="8" viewBox="0 0 11 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.25 4L4.14393 6.89393C4.20251 6.95251 4.29749 6.95251 4.35607 6.89393L10.25 1" stroke="#222222" stroke-width="1.2" />
|
||||
</svg>
|
||||
</div>
|
||||
<span>افزودن پرسنل به طرح</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="partial-tabs" id="partialContainer"></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@section Script
|
||||
{
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
var workshopId = '@Model.WorkshopId';
|
||||
var hasScheme = '@Model.HasScheme.ToString().ToLower()';
|
||||
console.log(hasScheme);
|
||||
|
||||
// پیشفرض: لود تب اول با workshopId
|
||||
loadPartial("/Admin/Company/Workshops/ClassificationScheme?handler=SchemeTab&workshopId=" + workshopId);
|
||||
$("#schemeTab").addClass("active");
|
||||
|
||||
// کلیک روی تبها
|
||||
$("#schemeTab, #jobsTab, #salaiesTab, #addEmployeesTab").click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
|
||||
let url = $(this).data("url");
|
||||
|
||||
|
||||
|
||||
switch(this.id){
|
||||
case "schemeTab" :
|
||||
url += "&workshopId=" + workshopId;
|
||||
loadPartial(url);
|
||||
|
||||
$("#schemeTab, #jobsTab, #salaiesTab, #addEmployeesTab").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
break;
|
||||
case "jobsTab" :
|
||||
if(hasScheme === "true"){
|
||||
loadPartial(url);
|
||||
$("#schemeTab, #jobsTab, #salaiesTab, #addEmployeesTab").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'ابتدا باید طرح ایجاد کنید');
|
||||
}
|
||||
break;
|
||||
case "salaiesTab" :
|
||||
if(hasScheme === "true"){
|
||||
loadPartial(url);
|
||||
$("#schemeTab, #jobsTab, #salaiesTab, #addEmployeesTab").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'ابتدا باید طرح ایجاد کنید');
|
||||
}
|
||||
break;
|
||||
case "addEmployeesTab" :
|
||||
if(hasScheme === "true"){
|
||||
loadPartial(url);
|
||||
$("#schemeTab, #jobsTab, #salaiesTab, #addEmployeesTab").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
|
||||
}else{
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', 'ابتدا باید طرح ایجاد کنید');
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function loadPartial(url) {
|
||||
$.get(url, function (data) {
|
||||
$("#partialContainer").html(data);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// $(document).ready(function () {
|
||||
// // پیشفرض: لود تب اول
|
||||
// loadPartial("/Admin/Company/Workshops/ClassificationScheme?handler=CreateScheme");
|
||||
// $("#creatScheme").addClass("active"); // تب اول اکتیو بشه
|
||||
|
||||
// // کلیک روی تبها
|
||||
// $("#creatScheme, #createJobs, #createSalaies, #addEmployees").click(function (e) {
|
||||
// e.preventDefault();
|
||||
|
||||
// // حذف active از همه تبها
|
||||
// $("#creatScheme, #createJobs, #createSalaies, #addEmployees").removeClass("active");
|
||||
|
||||
// // اضافه کردن active به تب کلیک شده
|
||||
// $(this).addClass("active");
|
||||
|
||||
// // گرفتن آدرس هندلر بر اساس id
|
||||
// let handlerUrl = "";
|
||||
// if (this.id === "creatScheme")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=CreateScheme";
|
||||
// else if (this.id === "createJobs")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=CreateJobs";
|
||||
// else if (this.id === "createSalaies")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=CreateSalaries";
|
||||
// else if (this.id === "addEmployees")
|
||||
// handlerUrl = "/Admin/Company/Workshops/ClassificationScheme?handler=AddEmployees";
|
||||
|
||||
// loadPartial(handlerUrl);
|
||||
// });
|
||||
|
||||
// function loadPartial(url) {
|
||||
// $.get(url, function (data) {
|
||||
// $("#partialContainer").html(data);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -1,12 +1,81 @@
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops;
|
||||
|
||||
/// <summary>
|
||||
/// صفحه تنظیمات طرح طبقه بندی مشاغل
|
||||
/// </summary>
|
||||
public class ClassificationSchemeModel : PageModel
|
||||
{
|
||||
public class ClassificationSchemeModel : PageModel
|
||||
private readonly IClassificationSchemeApplication _classificationSchemeApplication;
|
||||
|
||||
|
||||
public ClassificationSchemeModel(IClassificationSchemeApplication classificationSchemeApplication)
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
_classificationSchemeApplication = classificationSchemeApplication;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// آی دی کارگاه
|
||||
/// </summary>
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
public bool HasScheme { get; set; }
|
||||
public void OnGet(long workshopId)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
var scheme = _classificationSchemeApplication.ClassificationSchemePartialModel(workshopId).GetAwaiter().GetResult();
|
||||
HasScheme = scheme.HasScheme;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// تب ایجاد طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetSchemeTab(long workshopId)
|
||||
{
|
||||
//دریافت طرح
|
||||
var scheme = _classificationSchemeApplication.ClassificationSchemePartialModel(workshopId).GetAwaiter().GetResult();
|
||||
scheme.WorkshopId = workshopId;
|
||||
return Partial("_ClassificationPartials/ClassificationSchemeTab", scheme);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لود مودال ایجاد طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetCreateScheme(long workshopId)
|
||||
{
|
||||
var model = new CreateClassificationScheme();
|
||||
model.WorkshopId = workshopId;
|
||||
return Partial("_ClassificationPartials/CreateScheme", model);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد طرح
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<JsonResult> OnPostCreateScheme(CreateClassificationScheme command)
|
||||
{
|
||||
var result = await _classificationSchemeApplication.CreateClassificationScheme(command);
|
||||
return new JsonResult(result);
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateJobs()
|
||||
{
|
||||
return Partial("_ClassificationPartials/CreateClassificationGroupJobs");
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateSalaries()
|
||||
{
|
||||
return Partial("_ClassificationPartials/CreateClassificationGroupSalary");
|
||||
}
|
||||
|
||||
public IActionResult OnGetAddEmployees()
|
||||
{
|
||||
return Partial("_ClassificationPartials/AddClassificationEmployees");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,218 +10,217 @@ using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using ServiceHost.Hubs;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops;
|
||||
|
||||
[Authorize]
|
||||
public class CreateWorkshopModel : PageModel
|
||||
{
|
||||
[Authorize]
|
||||
public class CreateWorkshopModel : PageModel
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public CreateWorkshop Command;
|
||||
public SelectList Employers;
|
||||
|
||||
public CreateWorkshopModel(IWorkshopApplication workshopApplication, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper)
|
||||
{
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public CreateWorkshop Command;
|
||||
public SelectList Employers;
|
||||
_workshopApplication = workshopApplication;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public CreateWorkshopModel(IWorkshopApplication workshopApplication, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper)
|
||||
public void OnGet()
|
||||
{
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
var accounts = _accountRepository.GetAdminAccountsNew();
|
||||
var command = new CreateWorkshop
|
||||
{
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
var accounts = _accountRepository.GetAdminAccountsNew();
|
||||
var command = new CreateWorkshop
|
||||
{
|
||||
Employers = _EmployerApplication.GetAllEmployers(),
|
||||
AccountsList = accounts,
|
||||
SeniorContractAccountsList = accounts.Where(x => x.RoleId == 3).ToList(),
|
||||
JuniorContractAccountsList = accounts.Where(x => x.RoleId == 5).ToList(),
|
||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||
CutContractEndOfYear = IsActive.None,
|
||||
RotatingShiftCompute = true
|
||||
};
|
||||
Employers = _EmployerApplication.GetAllEmployers(),
|
||||
AccountsList = accounts,
|
||||
SeniorContractAccountsList = accounts.Where(x => x.RoleId == 3).ToList(),
|
||||
JuniorContractAccountsList = accounts.Where(x => x.RoleId == 5).ToList(),
|
||||
SeniorInsuranceAccountList = accounts.Where(x => x.RoleId == 7).ToList(),
|
||||
JuniorInsuranceAccountsList = accounts.Where(x => x.RoleId == 8).ToList(),
|
||||
InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle"),
|
||||
CutContractEndOfYear = IsActive.None,
|
||||
RotatingShiftCompute = true
|
||||
};
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
var checkOk = res.Any();
|
||||
int item = 0;
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
var checkOk = res.Any();
|
||||
int item = 0;
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
|
||||
string bb = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
bb += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(bb);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (checkOk)
|
||||
{
|
||||
item = codes.Max();
|
||||
}
|
||||
|
||||
int sum = item + 1;
|
||||
string newcode = sum.ToString();
|
||||
command.ArchiveCode = newcode;
|
||||
command.PermissionIds = permissionIds;
|
||||
// command.CurrentAccoutRoleId = currentAccout.RoleId;
|
||||
|
||||
|
||||
Command = command;
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreate(CreateWorkshop command)
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
bb += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNumber = false;
|
||||
|
||||
int convert = int.Parse(bb);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
if (checkOk)
|
||||
{
|
||||
item = codes.Max();
|
||||
}
|
||||
|
||||
int sum = item + 1;
|
||||
string newcode = sum.ToString();
|
||||
command.ArchiveCode = newcode;
|
||||
command.PermissionIds = permissionIds;
|
||||
// command.CurrentAccoutRoleId = currentAccout.RoleId;
|
||||
|
||||
|
||||
Command = command;
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreate(CreateWorkshop command)
|
||||
{
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
{
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
if (checkNumber)
|
||||
{
|
||||
//if (checkExist)
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
//Thread.Sleep(5000);
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? "" : command.TypeOfInsuranceSend;
|
||||
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Create(command);
|
||||
return new JsonResult(result);
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
checkNumber = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopName(string searchText)
|
||||
else
|
||||
{
|
||||
var result = _workshopApplication.GetWorkshopByTextSearch(searchText);
|
||||
result = result.OrderBy(x => x.WorkshopFullName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployerName(string searchText)
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
var result = _EmployerApplication.GetEmployerWithFNameOrLName(searchText);
|
||||
result = result.OrderBy(x => x.LName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null)
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
if (checkNumber)
|
||||
{
|
||||
//if (checkExist)
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
//Thread.Sleep(5000);
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? "" : command.TypeOfInsuranceSend;
|
||||
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Create(command);
|
||||
return new JsonResult(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopName(string searchText)
|
||||
{
|
||||
var result = _workshopApplication.GetWorkshopByTextSearch(searchText);
|
||||
result = result.OrderBy(x => x.WorkshopFullName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployerName(string searchText)
|
||||
{
|
||||
var result = _EmployerApplication.GetEmployerWithFNameOrLName(searchText);
|
||||
result = result.OrderBy(x => x.LName.Length).ToList();
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
mylist = result,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -13,260 +13,259 @@ using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallService;
|
||||
using CompanyManagment.EFCore.Repository;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops;
|
||||
|
||||
[Authorize]
|
||||
public class EditWorkshopModel : PageModel
|
||||
{
|
||||
[Authorize]
|
||||
public class EditWorkshopModel : PageModel
|
||||
public string Message { get; set; }
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IWorkshopRepository _workshopRepository;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public EditWorkshop Command;
|
||||
public SelectList Employers;
|
||||
public RollCallServiceViewModel RollCallService;
|
||||
public bool HasPermissionWorkshopInfo;
|
||||
public bool HasPermissionContract;
|
||||
public bool HasPermissionInsurance;
|
||||
public bool HasPermissionAccount;
|
||||
public List<AccountViewModel> DeactivatedAccounts;
|
||||
|
||||
public EditWorkshopModel(IWorkshopApplication workshopApplication, IWorkshopRepository workshopRepository, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper, IRollCallServiceApplication rollCallServiceApplication)
|
||||
{
|
||||
public string Message { get; set; }
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IWorkshopRepository _workshopRepository;
|
||||
private readonly IEmployerApplication _EmployerApplication;
|
||||
private readonly IAccountRepository _accountRepository;
|
||||
private readonly IInsuranceJobApplication _insuranceJobApplication;
|
||||
private readonly IRollCallServiceApplication _rollCallServiceApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public EditWorkshop Command;
|
||||
public SelectList Employers;
|
||||
public RollCallServiceViewModel RollCallService;
|
||||
public bool HasPermissionWorkshopInfo;
|
||||
public bool HasPermissionContract;
|
||||
public bool HasPermissionInsurance;
|
||||
public bool HasPermissionAccount;
|
||||
public List<AccountViewModel> DeactivatedAccounts;
|
||||
_workshopApplication = workshopApplication;
|
||||
_workshopRepository = workshopRepository;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
}
|
||||
|
||||
public EditWorkshopModel(IWorkshopApplication workshopApplication, IWorkshopRepository workshopRepository, IEmployerApplication employerApplication, IAccountRepository accountRepository, IInsuranceJobApplication insuranceJobApplication, IAuthHelper authHelper, IRollCallServiceApplication rollCallServiceApplication)
|
||||
public void OnGet(long id)
|
||||
{
|
||||
var permissions = _authHelper.GetPermissions();
|
||||
HasPermissionWorkshopInfo = permissions.Any(x => x == 10326);
|
||||
HasPermissionContract = permissions.Any(x => x == 10323);
|
||||
HasPermissionInsurance = permissions.Any(x => x == 10324);
|
||||
HasPermissionAccount = permissions.Any(x => x == 10330);
|
||||
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
// var currentAccout = _authHelper.CurrentAccountInfo();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_workshopRepository = workshopRepository;
|
||||
_EmployerApplication = employerApplication;
|
||||
_accountRepository = accountRepository;
|
||||
_insuranceJobApplication = insuranceJobApplication;
|
||||
_authHelper = authHelper;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
}
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
|
||||
public void OnGet(long id)
|
||||
{
|
||||
var permissions = _authHelper.GetPermissions();
|
||||
HasPermissionWorkshopInfo = permissions.Any(x => x == 10326);
|
||||
HasPermissionContract = permissions.Any(x => x == 10323);
|
||||
HasPermissionInsurance = permissions.Any(x => x == 10324);
|
||||
HasPermissionAccount = permissions.Any(x => x == 10330);
|
||||
RollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(id);
|
||||
if (RollCallService != null)
|
||||
RollCallService.EndServiceToFarsiDuration = RollCallService.EndServiceStr.ToFarsiDuration2();
|
||||
|
||||
var permissionIds = _authHelper.GetPermissions();
|
||||
// var currentAccout = _authHelper.CurrentAccountInfo();
|
||||
var list = _insuranceJobApplication.GetInsurancJob();
|
||||
var insuranceJob = list.Select(x => new InsuranceJobViewModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
InsuranceJobTitle = x.InsuranceJobTitle + " | " + x.EconomicCode,
|
||||
}).ToList();
|
||||
var allAccounts = _accountRepository.GetAccountsToEditWorkshop(id);
|
||||
|
||||
RollCallService = _rollCallServiceApplication.GetActiveServiceByWorkshopId(id);
|
||||
if (RollCallService != null)
|
||||
RollCallService.EndServiceToFarsiDuration = RollCallService.EndServiceStr.ToFarsiDuration2();
|
||||
var activeAccounts = allAccounts.Where(x => x.IsActiveString == "true").ToList();
|
||||
|
||||
var allAccounts = _accountRepository.GetAccountsToEditWorkshop(id);
|
||||
DeactivatedAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
|
||||
var activeAccounts = allAccounts.Where(x => x.IsActiveString == "true").ToList();
|
||||
var workshop = _workshopApplication.GetDetails(id);
|
||||
|
||||
DeactivatedAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
workshop.Employers = _EmployerApplication.GetAllEmployers();
|
||||
|
||||
var workshop = _workshopApplication.GetDetails(id);
|
||||
workshop.AccountsList = activeAccounts;
|
||||
|
||||
workshop.Employers = _EmployerApplication.GetAllEmployers();
|
||||
|
||||
workshop.AccountsList = activeAccounts;
|
||||
|
||||
var adminAccounts = _accountRepository.GetAdminAccountsNew();
|
||||
workshop.SeniorContractAccountsList = adminAccounts.Where(x => x.RoleId == 3).ToList();
|
||||
workshop.JuniorContractAccountsList = adminAccounts.Where(x => x.RoleId == 5).ToList();
|
||||
workshop.SeniorInsuranceAccountList = adminAccounts.Where(x => x.RoleId == 7).ToList();
|
||||
workshop.JuniorInsuranceAccountsList = adminAccounts.Where(x => x.RoleId == 8).ToList();
|
||||
var adminAccounts = _accountRepository.GetAdminAccountsNew();
|
||||
workshop.SeniorContractAccountsList = adminAccounts.Where(x => x.RoleId == 3).ToList();
|
||||
workshop.JuniorContractAccountsList = adminAccounts.Where(x => x.RoleId == 5).ToList();
|
||||
workshop.SeniorInsuranceAccountList = adminAccounts.Where(x => x.RoleId == 7).ToList();
|
||||
workshop.JuniorInsuranceAccountsList = adminAccounts.Where(x => x.RoleId == 8).ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
workshop.EmployerIdList = _workshopRepository.GetRelation(id);
|
||||
workshop.AccountIdsList = _workshopRepository.GetWorkshopAccountRelation(id);
|
||||
workshop.EmployerIdList = _workshopRepository.GetRelation(id);
|
||||
workshop.AccountIdsList = _workshopRepository.GetWorkshopAccountRelation(id);
|
||||
|
||||
workshop.DeActiveAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
workshop.ActiveAccounts = activeAccounts;
|
||||
//workshop.InAccountIdsList = _accountRepository.GetAccounts()
|
||||
// .Where(x => _workshopRepository.GetWorkshopAccountRelation(id).Contains(x.Id))
|
||||
// .ToList();
|
||||
workshop.DeActiveAccounts = allAccounts.Except(activeAccounts).ToList();
|
||||
workshop.ActiveAccounts = activeAccounts;
|
||||
//workshop.InAccountIdsList = _accountRepository.GetAccounts()
|
||||
// .Where(x => _workshopRepository.GetWorkshopAccountRelation(id).Contains(x.Id))
|
||||
// .ToList();
|
||||
|
||||
workshop.InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle");
|
||||
Message = workshop.ArchiveCode;
|
||||
workshop.PermissionIds = permissionIds;
|
||||
Command = workshop;
|
||||
workshop.InsuranceJobViewModels = new SelectList(insuranceJob, "Id", "InsuranceJobTitle");
|
||||
Message = workshop.ArchiveCode;
|
||||
workshop.PermissionIds = permissionIds;
|
||||
Command = workshop;
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostEdit(EditWorkshop command)
|
||||
{
|
||||
var aaa = command;
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public IActionResult OnPostEdit(EditWorkshop command)
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var workshop = _workshopApplication.GetDetails(command.Id);
|
||||
var lastNumber = workshop.ArchiveCode;
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
var pration = new OperationResult();
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
{
|
||||
var aaa = command;
|
||||
if (ModelState.IsValid)
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
{
|
||||
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
}
|
||||
|
||||
#region checkIsLegalAndNotIsLegal
|
||||
OperationResult resultIsLegal = new OperationResult();
|
||||
var selectEmployerList = _EmployerApplication.GetEmployers().Where(x => command.EmployerIdList.Contains(x.Id)).ToList();
|
||||
var isNotlegal = selectEmployerList.Where(x => x.IsLegal == "حقیقی").FirstOrDefault();
|
||||
var islegal = selectEmployerList.Where(x => x.IsLegal == "حقوقی").FirstOrDefault();
|
||||
|
||||
if (isNotlegal != null && islegal != null)
|
||||
return new JsonResult(resultIsLegal.Failed("امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد"));
|
||||
#endregion
|
||||
|
||||
var workshop = _workshopApplication.GetDetails(command.Id);
|
||||
var lastNumber = workshop.ArchiveCode;
|
||||
var res = _workshopApplication.GetWorkshop();
|
||||
bool checkNumber = false;
|
||||
bool checkExist = false;
|
||||
var pration = new OperationResult();
|
||||
string a = command.ArchiveCode;
|
||||
string bb = string.Empty;
|
||||
int convert2 = 0;
|
||||
if (!string.IsNullOrWhiteSpace(a))
|
||||
{
|
||||
for (int x = 0; x < a.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(a[x]))
|
||||
bb += a[x];
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNumber = false;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null && i.ArchiveCode != lastNumber)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
|
||||
if (checkNumber)
|
||||
{
|
||||
//var EmpoyersSelected = _EmployerRepository.Get(command.EmployerId);
|
||||
//if (EmpoyersSelected.EmployerNo == null)
|
||||
//{
|
||||
// EmpoyersSelected.EditEmployerNo(command.ArchiveCode);
|
||||
//}
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
#region Vafa
|
||||
|
||||
if (command.HasRollCallFreeVip == "ture")
|
||||
{
|
||||
//var todayPersianDate = DateTime.Now.ToFirstDayOfNextMonth();
|
||||
// var financialWorkshop
|
||||
//double amount = Convert.ToDouble(0);
|
||||
|
||||
//var commandSaveRollCall = new CreateRollCallService()
|
||||
//{
|
||||
// AccountId = _authHelper.CurrentAccountId(),
|
||||
// WorkshopId = command.Id,
|
||||
// ServiceType = "VIP",
|
||||
// EndService = command.EndService,
|
||||
// Amount = amount,
|
||||
// MaxPersonValid = -1,
|
||||
// Duration = command.Duration,
|
||||
//};
|
||||
|
||||
//var resultRollCall = _rollCallServiceApplication.Create(commandSaveRollCall);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "false";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Edit(command);
|
||||
|
||||
return new JsonResult(result);
|
||||
convert2 = int.Parse(bb);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
checkNumber = false;
|
||||
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
checkNumber = true;
|
||||
|
||||
}
|
||||
|
||||
var codes = new List<int>();
|
||||
foreach (var i in res)
|
||||
{
|
||||
|
||||
string b2 = string.Empty;
|
||||
|
||||
if (i.ArchiveCode != null && i.ArchiveCode != lastNumber)
|
||||
{
|
||||
for (int x = 0; x < i.ArchiveCode.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(i.ArchiveCode[x]))
|
||||
b2 += i.ArchiveCode[x];
|
||||
}
|
||||
|
||||
if (b2.Length > 0)
|
||||
{
|
||||
int convert = int.Parse(b2);
|
||||
codes.Add(convert);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
foreach (var item in codes)
|
||||
{
|
||||
if (item == convert2)
|
||||
checkExist = true;
|
||||
}
|
||||
|
||||
if (checkNumber)
|
||||
{
|
||||
//var EmpoyersSelected = _EmployerRepository.Get(command.EmployerId);
|
||||
//if (EmpoyersSelected.EmployerNo == null)
|
||||
//{
|
||||
// EmpoyersSelected.EditEmployerNo(command.ArchiveCode);
|
||||
//}
|
||||
command.InsuranceCode = !string.IsNullOrWhiteSpace(command.InsuranceCode) ? command.InsuranceCode.ConvertToEnglish() : "";
|
||||
command.ArchiveCode = !string.IsNullOrWhiteSpace(command.ArchiveCode) ? command.ArchiveCode.ConvertToEnglish() : "";
|
||||
command.AgreementNumber = !string.IsNullOrWhiteSpace(command.AgreementNumber) ? command.AgreementNumber.ConvertToEnglish() : "";
|
||||
command.TypeOfInsuranceSend = command.TypeOfInsuranceSend == "false" ? null : command.TypeOfInsuranceSend;
|
||||
|
||||
#region Vafa
|
||||
|
||||
if (command.HasRollCallFreeVip == "ture")
|
||||
{
|
||||
//var todayPersianDate = DateTime.Now.ToFirstDayOfNextMonth();
|
||||
// var financialWorkshop
|
||||
//double amount = Convert.ToDouble(0);
|
||||
|
||||
//var commandSaveRollCall = new CreateRollCallService()
|
||||
//{
|
||||
// AccountId = _authHelper.CurrentAccountId(),
|
||||
// WorkshopId = command.Id,
|
||||
// ServiceType = "VIP",
|
||||
// EndService = command.EndService,
|
||||
// Amount = amount,
|
||||
// MaxPersonValid = -1,
|
||||
// Duration = command.Duration,
|
||||
//};
|
||||
|
||||
//var resultRollCall = _rollCallServiceApplication.Create(commandSaveRollCall);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (command.HasRollCallFreeVip == "on")
|
||||
{
|
||||
command.HasRollCallFreeVip = "true";
|
||||
if (command.HasCustomizeCheckoutService == "on")
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "true";
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasCustomizeCheckoutService = "false";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
command.HasRollCallFreeVip = "false";
|
||||
}
|
||||
var result = _workshopApplication.Edit(command);
|
||||
|
||||
|
||||
return new JsonResult(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
var res2 = _workshopApplication.Err();
|
||||
return new JsonResult(res2);
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// var res3 = _workshopApplication.ExistErr();
|
||||
// return new JsonResult(res3);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -764,7 +764,7 @@
|
||||
<div class="buttons-container">
|
||||
@if (item.IsClassified)
|
||||
{
|
||||
<a permission="10317" asp-page="./ClassificationScheme" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty ? "disabled" : "")" style="background-color: #ec407a; border:#ec407a;">
|
||||
<a permission="10317" asp-page="./ClassificationScheme" asp-route-workshopId="@item.Id" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty ? "disabled" : "")" style="background-color: #ec407a; border:#ec407a;">
|
||||
<i class="fa fa-user"></i>
|
||||
<p>
|
||||
طرح طبقه بندی
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
|
||||
<div class="card card-pattern m-t-10">
|
||||
<button class="btn btn-success"> ایجاد پرسنل طرح</button>
|
||||
</div>
|
||||
@@ -0,0 +1,134 @@
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.ClassificationSchemePartialModel
|
||||
|
||||
@{
|
||||
int index = 1;
|
||||
<style>
|
||||
.head-table{
|
||||
font-size: 14px;
|
||||
background-color: #2dbcbc;
|
||||
padding: 4px 1px;
|
||||
border-radius: 5px;
|
||||
color: aliceblue;
|
||||
margin-bottom: 9px;
|
||||
}
|
||||
|
||||
.tr-table{
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 4px 1px;
|
||||
}
|
||||
|
||||
.row-number{
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.icon-span {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
line-height: 14px;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.icon-span svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
}
|
||||
<div class="card card-pattern m-t-10">
|
||||
|
||||
@if (!Model.HasScheme)
|
||||
{
|
||||
|
||||
|
||||
<a class="btn btn-success"
|
||||
style="border-radius:5px;" href="#showmodal=@Url.Page("./ClassificationScheme", "CreateScheme" ,new {workshopId = @Model.WorkshopId})">
|
||||
@* <i class="fa fa-user-plus" aria-hidden="true" style="margin: 0px 5px;"></i> *@
|
||||
<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>
|
||||
<span> ایجاد طرح </span>
|
||||
</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="row fw-bold mb-2 head-table">
|
||||
<div class="col-2 col-md-1">ردیف</div>
|
||||
<div class="col-10 col-md-3">نام طراح</div>
|
||||
<div class="col-6 col-md-2">تاریخ شمول</div>
|
||||
<div class="col-6 col-md-3">تاریخ اجرا</div>
|
||||
<div class="col-12 col-md-3" style="float:left; direction:ltr">عملیات</div>
|
||||
</div>
|
||||
|
||||
<!-- لیست -->
|
||||
@foreach (var item in Model.ClassificationSchemesList)
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table">
|
||||
|
||||
<div class="col-2 col-md-1"><div class="row-number">@index</div></div>
|
||||
<div class="col-10 col-md-3">@item.DesignerFullName</div>
|
||||
<div class="col-6 col-md-2">@item.IncludingDateFa</div>
|
||||
<div class="col-6 col-md-3">@item.ExecutionDateFa</div>
|
||||
@{
|
||||
index++;
|
||||
}
|
||||
<div class="col-12 col-md-3 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
<a
|
||||
style="border-radius:5px;" href="#showmodal=@Url.Page("./ClassificationScheme", "CreateScheme" ,new {workshopId = @Model.WorkshopId})" >
|
||||
<span class="icon-span" style="background-color:#ddd3e0">
|
||||
<svg width="19" height="18" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"></rect>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</a>
|
||||
|
||||
<a href="#">
|
||||
<span class="icon-span" style="background-color:#ade7f2">
|
||||
<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg" >
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"></path>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"></path>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
|
||||
<a href="#">
|
||||
<span class="icon-span" style="background-color: #ade7f2;padding: 4px;font-size: 11px;color: #009ee2;">
|
||||
بازنگری
|
||||
</span>
|
||||
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
<div class="card card-pattern m-t-10">
|
||||
<button class="btn btn-success"> ایجاد شغل</button>
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
@*
|
||||
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
|
||||
*@
|
||||
@{
|
||||
}
|
||||
<div class="card card-pattern m-t-10">
|
||||
<button class="btn btn-success"> ایجاد دستمزدها</button>
|
||||
</div>
|
||||
@@ -0,0 +1,85 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.CreateClassificationScheme
|
||||
@{
|
||||
<style>
|
||||
.modal-footer {
|
||||
padding: 0.5rem 1rem !important; /* کوچکتر کردن فاصله */
|
||||
margin-top: -10px; /* کمی بالا آوردن */
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content{
|
||||
padding-bottom : 10px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ایجاد طرح جدید</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="CreateScheme" method="post" autocomplete="off"
|
||||
data-ajax="true" data-action="Refresh" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
<!-- ردیف اول -->
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="DesignerFullName" class="form-label">نام طراح</label>
|
||||
<input asp-for="DesignerFullName" class="form-control" />
|
||||
<span asp-validation-for="DesignerFullName" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="DesignerPhone" class="form-label">شماره تماس طراح</label>
|
||||
<input asp-for="DesignerPhone" class="form-control" />
|
||||
<span asp-validation-for="DesignerPhone" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ردیف دوم -->
|
||||
<div class="row m-t-10" >
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="IncludingDateFa" class="form-label">تاریخ شمول طرح</label>
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control" style="text-align: center" />
|
||||
<span asp-validation-for="IncludingDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="ExecutionDateFa" class="form-label">تاریخ اجرای طرح</label>
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control" style="text-align: center" />
|
||||
<span asp-validation-for="ExecutionDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
<!-- ردیف سوم -->
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="TypeOfCoefficient" class="form-label" style="float: left;">نوع محاسبه ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<select asp-for="TypeOfCoefficient" class="form-select form-control">
|
||||
<option value="@((int)TypeOfCoefficient.RialCoefficient)">ضریب ریالی طرح</option>
|
||||
<option value="@((int)TypeOfCoefficient.JobOrganization)">ضریب شورای عالی کار</option>
|
||||
</select>
|
||||
<span asp-validation-for="TypeOfCoefficient" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="WorkshopId" value="@Model.WorkshopId"/>
|
||||
<div class="modal-footer border-0">
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user