Create razorPage for classificationScheme , add isClassificationCompleted bool to workshop Table
This commit is contained in:
@@ -185,8 +185,17 @@ public class Workshop : EntityBase
|
||||
public bool AddLeavePay { get; private set; }
|
||||
public string ZoneName { get; private set; }
|
||||
public bool TotalPaymentHide { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا طبقه بندی شده است
|
||||
/// [کارگاه دارای طرح طبقه بندی می باشد ؟]
|
||||
/// </summary>
|
||||
public bool IsClassified { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا طرح طبقه بندی تکمیل شده است
|
||||
/// </summary>
|
||||
public bool IsClassificationSchemeCompleted { get; private set; }
|
||||
|
||||
//نحوه محاسبه مزد مرخصی
|
||||
public string ComputeOptions { get; private set; }
|
||||
|
||||
@@ -113,37 +113,37 @@ public class WorkshopAppliction : IWorkshopApplication
|
||||
return operation.Failed("لطفا جمعیت شهر را انتخاب کنید");
|
||||
}
|
||||
|
||||
if (command.IsClassified)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(command.CreatePlan.ExecutionDateFa) || command.CreatePlan.ExecutionDateFa.Length < 10)
|
||||
return operation.Failed("تاریخ اجرای طرح را بصورت صحیح وارد کنید");
|
||||
if(string.IsNullOrWhiteSpace(command.CreatePlan.IncludingDateFa) || command.CreatePlan.IncludingDateFa.Length <10)
|
||||
return operation.Failed("تاریخ شمول طرح را بصورت صحیح وارد کنید");
|
||||
var groupCounter = 0;
|
||||
// var planEmployeeCounter = command.CreatePlan.EditWorkshopPlanEmployeeList == null ? 0 : command.CreatePlan.EditWorkshopPlanEmployeeList.Count;
|
||||
for (int i = 0; i <= command.CreatePlan.EditGroupPlanlist.Count - 1; i++)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].AnnualSalaryStr)
|
||||
&& !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].BaseSalaryStr)
|
||||
&& !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].JobSalaryStr)
|
||||
&& command.CreatePlan.EditGroupPlanlist[i].JobIdList.Count > 0)
|
||||
{
|
||||
groupCounter += 1;
|
||||
//if (command.IsClassified)
|
||||
//{
|
||||
// if (string.IsNullOrWhiteSpace(command.CreatePlan.ExecutionDateFa) || command.CreatePlan.ExecutionDateFa.Length < 10)
|
||||
// return operation.Failed("تاریخ اجرای طرح را بصورت صحیح وارد کنید");
|
||||
// if(string.IsNullOrWhiteSpace(command.CreatePlan.IncludingDateFa) || command.CreatePlan.IncludingDateFa.Length <10)
|
||||
// return operation.Failed("تاریخ شمول طرح را بصورت صحیح وارد کنید");
|
||||
// var groupCounter = 0;
|
||||
// // var planEmployeeCounter = command.CreatePlan.EditWorkshopPlanEmployeeList == null ? 0 : command.CreatePlan.EditWorkshopPlanEmployeeList.Count;
|
||||
// for (int i = 0; i <= command.CreatePlan.EditGroupPlanlist.Count - 1; i++)
|
||||
// {
|
||||
// if (!string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].AnnualSalaryStr)
|
||||
// && !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].BaseSalaryStr)
|
||||
// && !string.IsNullOrWhiteSpace(command.CreatePlan.EditGroupPlanlist[i].JobSalaryStr)
|
||||
// && command.CreatePlan.EditGroupPlanlist[i].JobIdList.Count > 0)
|
||||
// {
|
||||
// groupCounter += 1;
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
if (groupCounter >= 1)
|
||||
{
|
||||
createPlanValidations = true;
|
||||
// if (groupCounter >= 1)
|
||||
// {
|
||||
// createPlanValidations = true;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
createPlanValidations = false;
|
||||
return operation.Failed("وارد کردن اطلاعات تمامی گروه ها الزامی است");
|
||||
}
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// createPlanValidations = false;
|
||||
// return operation.Failed("وارد کردن اطلاعات تمامی گروه ها الزامی است");
|
||||
// }
|
||||
//}
|
||||
//if (string.IsNullOrWhiteSpace(command.TypeOfInsuranceSend))
|
||||
// return operation.Failed("لطفا نوع ارسال لیست بیمه را مشخص کنید");
|
||||
var account = new AccountViewModel();
|
||||
|
||||
10499
CompanyManagment.EFCore/Migrations/20250929210837_newPropToWorkshop.Designer.cs
generated
Normal file
10499
CompanyManagment.EFCore/Migrations/20250929210837_newPropToWorkshop.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class newPropToWorkshop : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsClassificationSchemeCompleted",
|
||||
table: "Workshops",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsClassificationSchemeCompleted",
|
||||
table: "Workshops");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6144,6 +6144,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<bool>("IsClassificationSchemeCompleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsClassified")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.Workshops.ClassificationSchemeModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
}
|
||||
|
||||
<h2>طرح طبقه بندی مشاغل</h2>
|
||||
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Areas.Admin.Pages.Company.Workshops
|
||||
{
|
||||
public class ClassificationSchemeModel : PageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -617,6 +617,11 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="" style="display: flex; align-items: center;">
|
||||
<input id="isClassified" type="checkbox" asp-for="Command.IsClassified" class="form-control" style="width: 15px;margin: 0 0 0 10px;" />
|
||||
<label asp-for="Command.IsClassified" style="margin: 0;">فعال سازی طرح طبقه بندی مشاغل</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="form5" style="display: none">
|
||||
|
||||
@@ -662,6 +662,11 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="" style="display: flex; align-items: center;">
|
||||
<input id="isClassified" type="checkbox" asp-for="Command.IsClassified" class="form-control" style="width: 15px;margin: 0 0 0 10px;"/>
|
||||
<label asp-for="Command.IsClassified" style="margin: 0;">فعال سازی طرح طبقه بندی مشاغل</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="form5" style="display: none">
|
||||
|
||||
@@ -762,6 +762,16 @@
|
||||
<div class="more-buttons flexible-div">
|
||||
<a class="btn pull-left employee-operations">عملیات</a>
|
||||
<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;">
|
||||
<i class="fa fa-user"></i>
|
||||
<p>
|
||||
طرح طبقه بندی
|
||||
</p>
|
||||
</a>
|
||||
}
|
||||
|
||||
<a permission="10317" asp-page="/Company/PersonnelInfo/Index" asp-route-workshopID="@item.Id" class="btn btn-success rad btn-rounded @(item.HasBlockContractingParty ? "disabled" : "")">
|
||||
<i class="fa fa-user"></i>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user