RollCall first upload - task and ticket changes - client changes
This commit is contained in:
@@ -1099,210 +1099,214 @@ public static class Tools
|
||||
return true;
|
||||
}
|
||||
|
||||
#region Mahan
|
||||
public static string ToFarsiDuration(this string date)
|
||||
{
|
||||
var today = DateTime.Now.ToFarsi();
|
||||
var year = Convert.ToInt32(today.Substring(0, 4));
|
||||
var month = Convert.ToInt32(today.Substring(5, 2));
|
||||
var day = Convert.ToInt32(today.Substring(8, 2));
|
||||
var todayPersianDate = new PersianDateTime(year, month, day);
|
||||
#region Mahan
|
||||
public static string ToFarsiDuration(this string date)
|
||||
{
|
||||
var today = DateTime.Now.ToFarsi();
|
||||
var year = Convert.ToInt32(today.Substring(0, 4));
|
||||
var month = Convert.ToInt32(today.Substring(5, 2));
|
||||
var day = Convert.ToInt32(today.Substring(8, 2));
|
||||
var todayPersianDate = new PersianDateTime(year, month, day);
|
||||
|
||||
var planYear = Convert.ToInt32(date.Substring(0, 4));
|
||||
var planMonth = Convert.ToInt32(date.Substring(5, 2));
|
||||
var planDay = Convert.ToInt32(date.Substring(8, 2));
|
||||
var planPersianDate = new PersianDateTime(planYear, planMonth, planDay);
|
||||
var planYear = Convert.ToInt32(date.Substring(0, 4));
|
||||
var planMonth = Convert.ToInt32(date.Substring(5, 2));
|
||||
var planDay = Convert.ToInt32(date.Substring(8, 2));
|
||||
var planPersianDate = new PersianDateTime(planYear, planMonth, planDay);
|
||||
|
||||
if (planPersianDate > todayPersianDate)
|
||||
{
|
||||
var countDay = 0;
|
||||
var counMonth = 0;
|
||||
var nextMonth = new PersianDateTime(todayPersianDate).AddMonths(1);
|
||||
for (var start = todayPersianDate; start <= planPersianDate; start = start.AddDays(1))
|
||||
{
|
||||
countDay++;
|
||||
if (start == nextMonth)
|
||||
{
|
||||
counMonth++;
|
||||
nextMonth = new PersianDateTime(start).AddMonths(1);
|
||||
countDay = 0;
|
||||
}
|
||||
}
|
||||
if (planPersianDate > todayPersianDate)
|
||||
{
|
||||
var countDay = 0;
|
||||
var counMonth = 0;
|
||||
var nextMonth = new PersianDateTime(todayPersianDate).AddMonths(1);
|
||||
for (var start = todayPersianDate; start <= planPersianDate; start = start.AddDays(1))
|
||||
{
|
||||
countDay++;
|
||||
if (start == nextMonth)
|
||||
{
|
||||
counMonth++;
|
||||
nextMonth = new PersianDateTime(start).AddMonths(1);
|
||||
countDay = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (counMonth > 0)
|
||||
{
|
||||
if (countDay == 0)
|
||||
{
|
||||
return $"{counMonth} ماه";
|
||||
}
|
||||
return $"{counMonth}ماه و {countDay} روز";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"{countDay}روز";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
if (counMonth > 0)
|
||||
{
|
||||
if (countDay == 0)
|
||||
{
|
||||
return $"{counMonth} ماه";
|
||||
}
|
||||
return $"{counMonth}ماه و {countDay} روز";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"{countDay}روز";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
public static string ToFarsiDuration2(this string date)
|
||||
{
|
||||
var persianCalendar = new System.Globalization.PersianCalendar();
|
||||
var today = DateTime.Now;
|
||||
public static string ToFarsiDuration2(this string date)
|
||||
{
|
||||
var persianCalendar = new System.Globalization.PersianCalendar();
|
||||
var today = DateTime.Now;
|
||||
|
||||
// Convert today's Gregorian date to Persian date
|
||||
var todayYear = persianCalendar.GetYear(today);
|
||||
var todayMonth = persianCalendar.GetMonth(today);
|
||||
var todayDay = persianCalendar.GetDayOfMonth(today);
|
||||
// Convert today's Gregorian date to Persian date
|
||||
var todayYear = persianCalendar.GetYear(today);
|
||||
var todayMonth = persianCalendar.GetMonth(today);
|
||||
var todayDay = persianCalendar.GetDayOfMonth(today);
|
||||
|
||||
var todayPersianDate = new DateTime(todayYear, todayMonth, todayDay, persianCalendar);
|
||||
var todayPersianDate = new DateTime(todayYear, todayMonth, todayDay, persianCalendar);
|
||||
|
||||
// Parse the target Persian date from the input string
|
||||
var planYear = int.Parse(date.Substring(0, 4));
|
||||
var planMonth = int.Parse(date.Substring(5, 2));
|
||||
var planDay = int.Parse(date.Substring(8, 2));
|
||||
// Parse the target Persian date from the input string
|
||||
var planYear = int.Parse(date.Substring(0, 4));
|
||||
var planMonth = int.Parse(date.Substring(5, 2));
|
||||
var planDay = int.Parse(date.Substring(8, 2));
|
||||
|
||||
var planPersianDate = new DateTime(planYear, planMonth, planDay, persianCalendar);
|
||||
var planPersianDate = new DateTime(planYear, planMonth, planDay, persianCalendar);
|
||||
|
||||
if (planPersianDate > todayPersianDate)
|
||||
{
|
||||
// Calculate the exact difference in years, months, and days
|
||||
int yearDifference = planYear - todayYear;
|
||||
int monthDifference = planMonth - todayMonth;
|
||||
int dayDifference = planDay - todayDay;
|
||||
if (planPersianDate > todayPersianDate)
|
||||
{
|
||||
// Calculate the exact difference in years, months, and days
|
||||
int yearDifference = planYear - todayYear;
|
||||
int monthDifference = planMonth - todayMonth;
|
||||
int dayDifference = planDay - todayDay;
|
||||
|
||||
if (dayDifference < 0)
|
||||
{
|
||||
monthDifference--;
|
||||
dayDifference += persianCalendar.GetDaysInMonth(todayYear, todayMonth);
|
||||
}
|
||||
if (dayDifference < 0)
|
||||
{
|
||||
monthDifference--;
|
||||
dayDifference += persianCalendar.GetDaysInMonth(todayYear, todayMonth);
|
||||
}
|
||||
|
||||
if (monthDifference < 0)
|
||||
{
|
||||
yearDifference--;
|
||||
monthDifference += 12;
|
||||
}
|
||||
if (monthDifference < 0)
|
||||
{
|
||||
yearDifference--;
|
||||
monthDifference += 12;
|
||||
}
|
||||
|
||||
// Construct the duration string
|
||||
var duration = "";
|
||||
if (yearDifference > 0)
|
||||
{
|
||||
duration += $"{yearDifference} سال ";
|
||||
}
|
||||
// Construct the duration string
|
||||
var duration = "";
|
||||
if (yearDifference > 0)
|
||||
{
|
||||
duration += $"{yearDifference} سال ";
|
||||
}
|
||||
|
||||
if (monthDifference > 0)
|
||||
{
|
||||
duration += $"{monthDifference} ماه ";
|
||||
}
|
||||
if (monthDifference > 0)
|
||||
{
|
||||
duration += $"{monthDifference} ماه ";
|
||||
}
|
||||
|
||||
if (dayDifference > 0)
|
||||
{
|
||||
duration += $"{dayDifference} روز";
|
||||
}
|
||||
if (dayDifference > 0)
|
||||
{
|
||||
duration += $"{dayDifference} روز";
|
||||
}
|
||||
|
||||
return duration.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return duration.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
#region DayOfWeekMethods
|
||||
#region DayOfWeekMethods
|
||||
|
||||
public static DateTime GetNextDayOfWeek(this DateTime date, DayOfWeek dayOfWeek)
|
||||
{
|
||||
int numberOfNextDayOfWeek = ((int)dayOfWeek - (int)date.DayOfWeek + 7) % 7;
|
||||
return date.AddDays(numberOfNextDayOfWeek == 0 ? 7 : numberOfNextDayOfWeek);
|
||||
}
|
||||
#endregion
|
||||
public static DateTime GetNextDayOfWeek(this DateTime date, DayOfWeek dayOfWeek)
|
||||
{
|
||||
int numberOfNextDayOfWeek = ((int)dayOfWeek - (int)date.DayOfWeek + 7) % 7;
|
||||
return date.AddDays(numberOfNextDayOfWeek == 0 ? 7 : numberOfNextDayOfWeek);
|
||||
}
|
||||
#endregion
|
||||
|
||||
//این متد آخر همان روز را به صورت دیت تایم برمیگرداند
|
||||
public static DateTime ToGeorgianDateTime2(this string persianDate)
|
||||
{
|
||||
persianDate = persianDate.ToEnglishNumber();
|
||||
try
|
||||
{
|
||||
var year = Convert.ToInt32(persianDate.Substring(0, 4));
|
||||
var month = Convert.ToInt32(persianDate.Substring(5, 2));
|
||||
var day = Convert.ToInt32(persianDate.Substring(8, 2));
|
||||
//این متد آخر همان روز را به صورت دیت تایم برمیگرداند
|
||||
public static DateTime ToGeorgianDateTime2(this string persianDate)
|
||||
{
|
||||
persianDate = persianDate.ToEnglishNumber();
|
||||
try
|
||||
{
|
||||
var year = Convert.ToInt32(persianDate.Substring(0, 4));
|
||||
var month = Convert.ToInt32(persianDate.Substring(5, 2));
|
||||
var day = Convert.ToInt32(persianDate.Substring(8, 2));
|
||||
|
||||
var res = new DateTime(year, month, day, new PersianCalendar());
|
||||
res = res.AddHours(23);
|
||||
res = res.AddMinutes(59);
|
||||
res = res.AddSeconds(59);
|
||||
var res = new DateTime(year, month, day, new PersianCalendar());
|
||||
res = res.AddHours(23);
|
||||
res = res.AddMinutes(59);
|
||||
res = res.AddSeconds(59);
|
||||
|
||||
return res;
|
||||
return res;
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
}
|
||||
|
||||
}
|
||||
//تبدیل به تاریخ با ساعت
|
||||
public static DateTime ToGeorgianDateWithTime(this string persianDate, string persianTime)
|
||||
{
|
||||
persianDate = persianDate.ToEnglishNumber();
|
||||
try
|
||||
{
|
||||
var year = Convert.ToInt32(persianDate.Substring(0, 4));
|
||||
var month = Convert.ToInt32(persianDate.Substring(5, 2));
|
||||
var day = Convert.ToInt32(persianDate.Substring(8, 2));
|
||||
}
|
||||
//تبدیل به تاریخ با ساعت
|
||||
public static DateTime ToGeorgianDateWithTime(this string persianDate, string persianTime)
|
||||
{
|
||||
persianDate = persianDate.ToEnglishNumber();
|
||||
try
|
||||
{
|
||||
var year = Convert.ToInt32(persianDate.Substring(0, 4));
|
||||
var month = Convert.ToInt32(persianDate.Substring(5, 2));
|
||||
var day = Convert.ToInt32(persianDate.Substring(8, 2));
|
||||
|
||||
|
||||
|
||||
var hour = int.Parse(persianTime.Substring(0, 2));
|
||||
var minute = int.Parse(persianTime.Substring(3, 2));
|
||||
var hour = int.Parse(persianTime.Substring(0, 2));
|
||||
var minute = int.Parse(persianTime.Substring(3, 2));
|
||||
|
||||
var res = new DateTime(year, month, day, new PersianCalendar());
|
||||
res = res.AddHours(hour);
|
||||
res = res.AddMinutes(minute);
|
||||
return res;
|
||||
var res = new DateTime(year, month, day, new PersianCalendar());
|
||||
res = res.AddHours(hour);
|
||||
res = res.AddMinutes(minute);
|
||||
return res;
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static string DayOfWeeKToPersian(this DayOfWeek dayOfWeek)
|
||||
{
|
||||
return dayOfWeek switch
|
||||
{
|
||||
DayOfWeek.Friday => "جمعه",
|
||||
DayOfWeek.Monday => "دوشنبه",
|
||||
DayOfWeek.Saturday => "شنبه",
|
||||
DayOfWeek.Sunday => "یکشنبه",
|
||||
DayOfWeek.Thursday => "پنجشنبه",
|
||||
DayOfWeek.Tuesday => "سه شنبه",
|
||||
DayOfWeek.Wednesday => "چهارشنبه",
|
||||
_ => ""
|
||||
};
|
||||
}
|
||||
public static string DayOfWeeKToPersian(this DayOfWeek dayOfWeek)
|
||||
{
|
||||
return dayOfWeek switch
|
||||
{
|
||||
DayOfWeek.Friday => "جمعه",
|
||||
DayOfWeek.Monday => "دوشنبه",
|
||||
DayOfWeek.Saturday => "شنبه",
|
||||
DayOfWeek.Sunday => "یکشنبه",
|
||||
DayOfWeek.Thursday => "پنجشنبه",
|
||||
DayOfWeek.Tuesday => "سه شنبه",
|
||||
DayOfWeek.Wednesday => "چهارشنبه",
|
||||
_ => ""
|
||||
};
|
||||
}
|
||||
|
||||
public static bool IsInvalidDateTime(this DateTime date)
|
||||
{
|
||||
return date == new DateTime(3000, 12, 20, new PersianCalendar());
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Pooya
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
public static DateTime GetUndefinedDateTime()
|
||||
{
|
||||
return new DateTime(2121, 03, 21);
|
||||
}
|
||||
|
||||
#region Pooya
|
||||
|
||||
|
||||
|
||||
public static DateTime GetUndefinedDateTime()
|
||||
{
|
||||
return new DateTime(2121, 03, 21);
|
||||
}
|
||||
|
||||
public static bool IsDateUndefined(this DateTime date)
|
||||
{
|
||||
return date == new DateTime(2121, 03, 21);
|
||||
}
|
||||
#endregion
|
||||
public static bool IsDateUndefined(this DateTime date)
|
||||
{
|
||||
return date == new DateTime(2121, 03, 21);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -10,8 +10,8 @@ public static class Version
|
||||
{
|
||||
static Version()
|
||||
{
|
||||
StyleVersion = "2.12.06";
|
||||
AdminVersion = "2.5.26";
|
||||
StyleVersion = "2.12.07";
|
||||
AdminVersion = "2.5.27";
|
||||
CameraVersion = "1.0.4";
|
||||
}
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ public class TaskApplication : ITaskApplication
|
||||
foreach (var receiver in receivers)
|
||||
{
|
||||
var assign = new Assign(task.id, task.SenderId, receiver.id, sender.Position.PositionValue, receiver.Fullname,
|
||||
receiver.Position.PositionValue, endTask);
|
||||
receiver.Position.PositionValue, endTask,true);
|
||||
_assignRepository.Create(assign);
|
||||
}
|
||||
|
||||
@@ -901,6 +901,10 @@ public class TaskApplication : ITaskApplication
|
||||
}
|
||||
|
||||
DateTime timeGr = time.ToGeorgianDateTime2();
|
||||
if (timeGr.IsInvalidDateTime())
|
||||
{
|
||||
return operation.Failed("لطفا تاریخ خود را به درستی وارد کنید");
|
||||
}
|
||||
assign.ChangeTimeTask(timeGr);
|
||||
var messageEntity = new TaskMessage(message, "تایید و تغییر درخواست کنسل", assign.id);
|
||||
_taskMessageRepository.Create(messageEntity);
|
||||
|
||||
@@ -214,7 +214,7 @@ public class TicketApplication : ITicketApplication
|
||||
foreach (var receiver in receivers)
|
||||
{
|
||||
var assign = new Assign(task.id, task.SenderId, receiver.id, sender.Position.PositionValue, receiver.Fullname,
|
||||
receiver.Position.PositionValue, endTask);
|
||||
receiver.Position.PositionValue, endTask,true);
|
||||
_assignRepository.Create(assign);
|
||||
}
|
||||
_assignRepository.SaveChanges();
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace AccountManagement.Domain.AssignAgg;
|
||||
|
||||
public class Assign : EntityBase
|
||||
{
|
||||
public Assign(long taskId, long assignerId, long assignedId, int assignerPositionValue, string assignedName, int assignedPositionValue, DateTime endTaskDate)
|
||||
public Assign(long taskId, long assignerId, long assignedId, int assignerPositionValue, string assignedName, int assignedPositionValue, DateTime endTaskDate, bool firstTimeCreation = false)
|
||||
{
|
||||
TaskId = taskId;
|
||||
AssignerId = assignerId;
|
||||
@@ -17,7 +17,8 @@ public class Assign : EntityBase
|
||||
AssignedName = assignedName;
|
||||
AssignedPositionValue = assignedPositionValue;
|
||||
EndTaskDate = endTaskDate;
|
||||
}
|
||||
FirstTimeCreation = firstTimeCreation;
|
||||
}
|
||||
|
||||
//آیدی شخص ارسال کننده
|
||||
public long TaskId { get; private set; }
|
||||
@@ -51,7 +52,7 @@ public class Assign : EntityBase
|
||||
|
||||
public string? DoneDescription { get; private set; }
|
||||
public bool IsCanceledRequest { get; private set; }
|
||||
|
||||
public bool FirstTimeCreation { get; private set; }
|
||||
public Tasks Task { get; set; }
|
||||
public List<TaskMessage> TaskMessageList { get; set; }
|
||||
|
||||
|
||||
@@ -0,0 +1,954 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
{
|
||||
[DbContext(typeof(AccountContext))]
|
||||
[Migration("20240908171608_addFirstTimeCreationToAssign")]
|
||||
partial class addFirstTimeCreationToAssign
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "8.0.4")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<string>("AdminAreaPermission")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("ClientAriaPermission")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("Fullname")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("IsActiveString")
|
||||
.HasMaxLength(6)
|
||||
.HasColumnType("nvarchar(6)");
|
||||
|
||||
b.Property<string>("Mobile")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<string>("NationalCode")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<long?>("PositionId")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("PositionIsActive")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("ProfilePhoto")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<long>("RoleId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("VerifyCode")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("PositionId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("Accounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AccountLeftWorkAgg.AccountLeftWork", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("AccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("LeftWorkGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("StartWorkGr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("AccountId");
|
||||
|
||||
b.ToTable("AccountLeftWork", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("AdminAccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("IsActiveString")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Response")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<long>("TicketId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("TicketId");
|
||||
|
||||
b.ToTable("AdminResponses", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AdminResponseMediaAgg.AdminResponseMedia", b =>
|
||||
{
|
||||
b.Property<long>("AdminResponseId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("AdminResponseId", "MediaId");
|
||||
|
||||
b.HasIndex("MediaId");
|
||||
|
||||
b.ToTable("AdminResponseMedias", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<int>("AcceptedTimeRequest")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("AssignedId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("AssignedName")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<int>("AssignedPositionValue")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("AssignerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<int>("AssignerPositionValue")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CancelDescription")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoneDescription")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<DateTime>("EndTaskDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("FirstTimeCreation")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsCancel")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsCanceledRequest")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDone")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDoneRequest")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("RequestDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("TaskId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<bool>("TimeRequest")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("TimeRequestDescription")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("TaskId");
|
||||
|
||||
b.ToTable("Assigns", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.CameraAccountAgg.CameraAccount", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("AccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("IsActiveSting")
|
||||
.IsRequired()
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Mobile")
|
||||
.HasMaxLength(11)
|
||||
.HasColumnType("nvarchar(11)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("WorkshopName")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("AccountId");
|
||||
|
||||
b.ToTable("CameraAccounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Response")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<long>("TicketId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("TicketId");
|
||||
|
||||
b.ToTable("ClientResponses", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.ClientResponseMediaAgg.ClientResponseMedia", b =>
|
||||
{
|
||||
b.Property<long>("ClientResponseId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("ClientResponseId", "MediaId");
|
||||
|
||||
b.HasIndex("MediaId");
|
||||
|
||||
b.ToTable("ClientResponseMedias", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.MediaAgg.Media", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<string>("Category")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Path")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Medias", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Roles", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<string>("ContractingPartyName")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<string>("IsActiveString")
|
||||
.HasMaxLength(7)
|
||||
.HasColumnType("nvarchar(7)");
|
||||
|
||||
b.Property<long>("SenderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("StartTaskDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long?>("TaskScheduleId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long?>("TicketId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("TaskScheduleId");
|
||||
|
||||
b.ToTable("TasksManager", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMediaAgg.TaskMedia", b =>
|
||||
{
|
||||
b.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TaskId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("MediaId", "TaskId");
|
||||
|
||||
b.HasIndex("TaskId");
|
||||
|
||||
b.ToTable("TasksMedias", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMessageAgg.TaskMessage", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("AssignId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Message")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<string>("RequestedDateFa")
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("nvarchar(25)");
|
||||
|
||||
b.Property<string>("TypeOfMessage")
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("AssignId");
|
||||
|
||||
b.ToTable("TaskMessages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMessageItemsAgg.TaskMessageItems", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("ReceiverAccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("SenderAccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("TaskMessageId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("TaskMessageId");
|
||||
|
||||
b.ToTable("TaskMessageItems", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskScheduleAgg.TaskSchedule", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<string>("Count")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("LastEndTaskDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Type")
|
||||
.HasMaxLength(12)
|
||||
.HasColumnType("nvarchar(12)");
|
||||
|
||||
b.Property<string>("UnitNumber")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("UnitType")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("TaskSchedules", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskSubjectAgg.TaskSubject", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Subject")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("TaskSubjects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TicketAccessAccountAgg.TicketAccessAccount", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<long>("AccountId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("TicketAccessAccounts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<string>("ContractingPartyName")
|
||||
.HasMaxLength(155)
|
||||
.HasColumnType("nvarchar(155)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("ntext");
|
||||
|
||||
b.Property<long>("SenderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Status")
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<long>("SubAccountSenderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("TicketNumber")
|
||||
.HasMaxLength(12)
|
||||
.HasColumnType("nvarchar(12)");
|
||||
|
||||
b.Property<string>("TicketType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Title")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Tickets", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TicketMediasAgg.TicketMedia", b =>
|
||||
{
|
||||
b.Property<long>("TicketId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("TicketId", "MediaId");
|
||||
|
||||
b.HasIndex("MediaId");
|
||||
|
||||
b.ToTable("TicketMedias", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TaskManager.Domain.PositionAgg.Position", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("PositionName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("PositionValue")
|
||||
.HasMaxLength(2)
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("Positions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b =>
|
||||
{
|
||||
b.HasOne("TaskManager.Domain.PositionAgg.Position", "Position")
|
||||
.WithMany("Accounts")
|
||||
.HasForeignKey("PositionId");
|
||||
|
||||
b.HasOne("AccountManagement.Domain.RoleAgg.Role", "Role")
|
||||
.WithMany("Accounts")
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Position");
|
||||
|
||||
b.Navigation("Role");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AccountLeftWorkAgg.AccountLeftWork", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.AccountAgg.Account", "Account")
|
||||
.WithMany("AccountLeftWorkList")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket")
|
||||
.WithMany("AdminResponses")
|
||||
.HasForeignKey("TicketId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ticket");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AdminResponseMediaAgg.AdminResponseMedia", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.AdminResponseAgg.AdminResponse", "AdminResponse")
|
||||
.WithMany("AdminResponseMedias")
|
||||
.HasForeignKey("AdminResponseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media")
|
||||
.WithMany("AdminResponseMedias")
|
||||
.HasForeignKey("MediaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("AdminResponse");
|
||||
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.TaskAgg.Tasks", "Task")
|
||||
.WithMany("Assigns")
|
||||
.HasForeignKey("TaskId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.Navigation("Task");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.CameraAccountAgg.CameraAccount", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.AccountAgg.Account", "Account")
|
||||
.WithMany("CameraAccounts")
|
||||
.HasForeignKey("AccountId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket")
|
||||
.WithMany("ClientResponses")
|
||||
.HasForeignKey("TicketId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Ticket");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.ClientResponseMediaAgg.ClientResponseMedia", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.ClientResponseAgg.ClientResponse", "ClientResponse")
|
||||
.WithMany("ClientResponseMedias")
|
||||
.HasForeignKey("ClientResponseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media")
|
||||
.WithMany("ClientResponseMedias")
|
||||
.HasForeignKey("MediaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ClientResponse");
|
||||
|
||||
b.Navigation("Media");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b =>
|
||||
{
|
||||
b.OwnsMany("AccountManagement.Domain.RoleAgg.Permission", "Permissions", b1 =>
|
||||
{
|
||||
b1.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("Id"));
|
||||
|
||||
b1.Property<int>("Code")
|
||||
.HasColumnType("int");
|
||||
|
||||
b1.Property<long>("RoleId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.HasKey("Id");
|
||||
|
||||
b1.HasIndex("RoleId");
|
||||
|
||||
b1.ToTable("RolePermissions", (string)null);
|
||||
|
||||
b1.WithOwner("Role")
|
||||
.HasForeignKey("RoleId");
|
||||
|
||||
b1.Navigation("Role");
|
||||
});
|
||||
|
||||
b.Navigation("Permissions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.TaskScheduleAgg.TaskSchedule", "TaskSchedule")
|
||||
.WithMany("TasksList")
|
||||
.HasForeignKey("TaskScheduleId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.Navigation("TaskSchedule");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMediaAgg.TaskMedia", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media")
|
||||
.WithMany("TaskMedias")
|
||||
.HasForeignKey("MediaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AccountManagement.Domain.TaskAgg.Tasks", "Tasks")
|
||||
.WithMany("TaskMedias")
|
||||
.HasForeignKey("TaskId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Media");
|
||||
|
||||
b.Navigation("Tasks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMessageAgg.TaskMessage", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.AssignAgg.Assign", "Assign")
|
||||
.WithMany("TaskMessageList")
|
||||
.HasForeignKey("AssignId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Assign");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMessageItemsAgg.TaskMessageItems", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.TaskMessageAgg.TaskMessage", "TaskMessage")
|
||||
.WithMany("TaskMessageItemsList")
|
||||
.HasForeignKey("TaskMessageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TaskMessage");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TicketMediasAgg.TicketMedia", b =>
|
||||
{
|
||||
b.HasOne("AccountManagement.Domain.MediaAgg.Media", "Media")
|
||||
.WithMany("TicketMedias")
|
||||
.HasForeignKey("MediaId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("AccountManagement.Domain.TicketAgg.Ticket", "Ticket")
|
||||
.WithMany("TicketMedias")
|
||||
.HasForeignKey("TicketId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Media");
|
||||
|
||||
b.Navigation("Ticket");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AccountAgg.Account", b =>
|
||||
{
|
||||
b.Navigation("AccountLeftWorkList");
|
||||
|
||||
b.Navigation("CameraAccounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AdminResponseAgg.AdminResponse", b =>
|
||||
{
|
||||
b.Navigation("AdminResponseMedias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.AssignAgg.Assign", b =>
|
||||
{
|
||||
b.Navigation("TaskMessageList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.ClientResponseAgg.ClientResponse", b =>
|
||||
{
|
||||
b.Navigation("ClientResponseMedias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.MediaAgg.Media", b =>
|
||||
{
|
||||
b.Navigation("AdminResponseMedias");
|
||||
|
||||
b.Navigation("ClientResponseMedias");
|
||||
|
||||
b.Navigation("TaskMedias");
|
||||
|
||||
b.Navigation("TicketMedias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.RoleAgg.Role", b =>
|
||||
{
|
||||
b.Navigation("Accounts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskAgg.Tasks", b =>
|
||||
{
|
||||
b.Navigation("Assigns");
|
||||
|
||||
b.Navigation("TaskMedias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskMessageAgg.TaskMessage", b =>
|
||||
{
|
||||
b.Navigation("TaskMessageItemsList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TaskScheduleAgg.TaskSchedule", b =>
|
||||
{
|
||||
b.Navigation("TasksList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AccountManagement.Domain.TicketAgg.Ticket", b =>
|
||||
{
|
||||
b.Navigation("AdminResponses");
|
||||
|
||||
b.Navigation("ClientResponses");
|
||||
|
||||
b.Navigation("TicketMedias");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TaskManager.Domain.PositionAgg.Position", b =>
|
||||
{
|
||||
b.Navigation("Accounts");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addFirstTimeCreationToAssign : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "FirstTimeCreation",
|
||||
table: "Assigns",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FirstTimeCreation",
|
||||
table: "Assigns");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -217,6 +217,9 @@ namespace AccountMangement.Infrastructure.EFCore.Migrations
|
||||
b.Property<DateTime>("EndTaskDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("FirstTimeCreation")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsCancel")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class PositionRepository : RepositoryBase<long, Position>, IPositionRepos
|
||||
public List<AccountViewModel> GetNoPositionAccounts()
|
||||
{
|
||||
|
||||
return _accountContext.Accounts.Where(x =>( x.PositionId == null || (x.PositionId !=null && x.PositionIsActive== "false"))&& x.IsActiveString == "true" && x.AdminAreaPermission == "true").Select(x => new AccountViewModel()
|
||||
return _accountContext.Accounts.Where(x =>( x.PositionId == null || (x.PositionId !=null && x.PositionIsActive!= "true"))&& x.IsActiveString == "true" && x.AdminAreaPermission == "true").Select(x => new AccountViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
Fullname = x.Fullname
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace Company.Domain.RollCallAgg
|
||||
{
|
||||
EditRollCall GetByEmployeeIdAndWorkshopId(long employeeId, long workshopId);
|
||||
EditRollCall GetById(long id);
|
||||
List<RollCallViewModel> GetCurrentDay(RollCallSearchModel searchModel);
|
||||
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
|
||||
List<RollCallViewModel> Search(RollCallSearchModel searchModel);
|
||||
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.RollCall
|
||||
{
|
||||
public class EmployeeRollCallsByMonthViewModel
|
||||
{
|
||||
public DateTime DateGr { get; set; }
|
||||
public string PersianYear { get; set; }
|
||||
public string PersianMonthName { get; set; }
|
||||
public class EmployeeRollCallsByMonthViewModel
|
||||
{
|
||||
public DateTime DateGr { get; set; }
|
||||
public string PersianYear { get; set; }
|
||||
public string PersianMonthName { get; set; }
|
||||
|
||||
public IEnumerable<RollCallViewModel> RollCalls { get; set; }
|
||||
}
|
||||
public IEnumerable<RollCallViewModel> RollCalls { get; set; }
|
||||
public string DateIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,7 @@ namespace CompanyManagment.App.Contracts.RollCall
|
||||
|
||||
EditRollCall GetById(long id);
|
||||
List<RollCallViewModel> Search(RollCallSearchModel searchModel);
|
||||
List<RollCallViewModel> GetCurrentDay(RollCallSearchModel searchModel);
|
||||
List<RollCallViewModel> GetHistoryCase(RollCallSearchModel searchModel);
|
||||
|
||||
CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId);
|
||||
RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel);
|
||||
long Flag(long employeeId, long workshopId);
|
||||
|
||||
@@ -28,7 +28,6 @@ public class RollCallViewModel
|
||||
public int Month { get; set; }
|
||||
public bool IsAbsent { get; set; }
|
||||
public bool HasLeave { get; set; }
|
||||
public DateTime? DateIndex { get; set; }
|
||||
public string DayOfWeekFa { get; set; }
|
||||
public bool IsHoliday { get; set; }
|
||||
}
|
||||
@@ -28,4 +28,5 @@ public class RollCallEmployeeViewModel : EditRollCallEmployee
|
||||
//نحوه محاسبه سنوات
|
||||
public string YearsOptions { get; set; }
|
||||
public string EmployeeSlug { get; set; }
|
||||
public List<RollCallEmployeeViewModel> PersonnelInfoViewModels { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -54,30 +55,6 @@ public class RollCallApplication : IRollCallApplication
|
||||
{
|
||||
return _rollCallRepository.GetByEmployeeIdAndWorkshopId(employeeId, workshopId);
|
||||
}
|
||||
public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId, string startDateTime, string endDateTime, string exactDateTime,
|
||||
string dateIndex)
|
||||
{
|
||||
DateTime? startDateTimeGr = null;
|
||||
DateTime? endDateTimeGr = null;
|
||||
if (!string.IsNullOrWhiteSpace(startDateTime) && !string.IsNullOrWhiteSpace(endDateTime))
|
||||
{
|
||||
startDateTimeGr = startDateTime.ToGeorgianDateTime();
|
||||
endDateTimeGr = endDateTime.ToGeorgianDateTime();
|
||||
}
|
||||
|
||||
DateTime? exactDateTimeGr =
|
||||
!string.IsNullOrWhiteSpace(exactDateTime) ? exactDateTime.ToGeorgianDateTime() : null;
|
||||
DateTime? index;
|
||||
try
|
||||
{
|
||||
index = DateTime.Parse(dateIndex);
|
||||
}
|
||||
catch
|
||||
{
|
||||
index = null;
|
||||
}
|
||||
return _rollCallRepository.GetEmployeeRollCallsHistory(employeeId, workshopId, startDateTimeGr, endDateTimeGr, exactDateTimeGr, index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,43 +68,70 @@ public class RollCallApplication : IRollCallApplication
|
||||
return _rollCallRepository.Search(searchModel);
|
||||
}
|
||||
|
||||
public List<RollCallViewModel> GetCurrentDay(RollCallSearchModel searchModel)
|
||||
{
|
||||
return _rollCallRepository.GetCurrentDay(searchModel);
|
||||
}
|
||||
|
||||
public List<RollCallViewModel> GetHistoryCase(RollCallSearchModel searchModel)
|
||||
{
|
||||
return _rollCallRepository.GetCurrentDay(searchModel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel)
|
||||
{
|
||||
return _rollCallRepository.GetWorkshopRollCallHistory(searchModel);
|
||||
}
|
||||
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
|
||||
{
|
||||
return _rollCallRepository.GetWorkshopCurrentDayRollCalls(workshopId);
|
||||
}
|
||||
#region Pooya
|
||||
|
||||
public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel)
|
||||
{
|
||||
return _rollCallRepository.GetWorkshopRollCallHistory(searchModel);
|
||||
}
|
||||
|
||||
public CurrentDayRollCall GetWorkshopCurrentDayRollCalls(long workshopId)
|
||||
{
|
||||
return _rollCallRepository.GetWorkshopCurrentDayRollCalls(workshopId);
|
||||
}
|
||||
public List<CheckoutDailyRollCallViewModel> GetActiveEmployeeRollCallsForDuration(long employeeId, long workshopId, string startDate,
|
||||
string endDate)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(startDate) || !string.IsNullOrWhiteSpace(endDate))
|
||||
return new();
|
||||
string endDate)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(startDate) || !string.IsNullOrWhiteSpace(endDate))
|
||||
return new();
|
||||
|
||||
var startDateGr = startDate.ToGeorgianDateTime();
|
||||
var endDateGr = endDate.ToGeorgianDateTime();
|
||||
var startDateGr = startDate.ToGeorgianDateTime();
|
||||
var endDateGr = endDate.ToGeorgianDateTime();
|
||||
|
||||
if (startDateGr >= endDateGr)
|
||||
return new();
|
||||
if (startDateGr >= endDateGr)
|
||||
return new();
|
||||
|
||||
//if (!_rollCallEmployeeRepository.Exists(x => x.EmployeeId == employeeId &&
|
||||
// x.WorkshopId == workshopId && x.IsActiveString == "true"))
|
||||
// return new();
|
||||
return _rollCallRepository.GetEmployeeRollCallsForMonth(employeeId, workshopId, startDateGr, endDateGr);
|
||||
}
|
||||
//if (!_rollCallEmployeeRepository.Exists(x => x.EmployeeId == employeeId &&
|
||||
// x.WorkshopId == workshopId && x.IsActiveString == "true"))
|
||||
// return new();
|
||||
return _rollCallRepository.GetEmployeeRollCallsForMonth(employeeId, workshopId, startDateGr, endDateGr);
|
||||
}
|
||||
|
||||
|
||||
public EmployeeRollCallsByMonthViewModel GetEmployeeRollCallsHistory(long employeeId, long workshopId, string startDateTime, string endDateTime, string exactDateTime,
|
||||
string dateIndex)
|
||||
{
|
||||
DateTime? startDateTimeGr = null;
|
||||
DateTime? endDateTimeGr = null;
|
||||
if (!string.IsNullOrWhiteSpace(startDateTime) && !string.IsNullOrWhiteSpace(endDateTime))
|
||||
{
|
||||
startDateTimeGr = startDateTime.ToGeorgianDateTime();
|
||||
endDateTimeGr = endDateTime.ToGeorgianDateTime();
|
||||
if (endDateTimeGr <= startDateTimeGr)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DateTime? exactDateTimeGr =
|
||||
!string.IsNullOrWhiteSpace(exactDateTime) ? exactDateTime.ToGeorgianDateTime() : null;
|
||||
|
||||
|
||||
DateTime? index = null;
|
||||
if (!string.IsNullOrWhiteSpace(dateIndex))
|
||||
{
|
||||
index = dateIndex.ToGeorgianDateTime();
|
||||
index = (index.Value.Date >= DateTime.Now) || (index.Value == new DateTime(3000, 12, 20, new PersianCalendar())) ? null : index;
|
||||
|
||||
}
|
||||
|
||||
return _rollCallRepository.GetEmployeeRollCallsHistory(employeeId, workshopId, startDateTimeGr, endDateTimeGr, exactDateTimeGr, index);
|
||||
}
|
||||
#endregion
|
||||
public long Flag(long employeeId, long workshopId)
|
||||
{
|
||||
return _rollCallRepository.Flag(employeeId, workshopId);
|
||||
|
||||
@@ -1,29 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.LeftWorkAgg;
|
||||
using Company.Domain.RollCallEmployeeAgg;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployeeStatus;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class RollCallEmployeeApplication : IRollCallEmployeeApplication
|
||||
{
|
||||
private readonly IRollCallEmployeeRepository _rollCallEmployeeRepository;
|
||||
private readonly IEmployeeRepository _employeeRepository;
|
||||
private readonly IRollCallEmployeeStatusApplication _rollCallEmployeeStatusApplication;
|
||||
private readonly IEmployeeRepository _employeeRepository;
|
||||
private readonly ILeftWorkRepository _leftWorkRepository;
|
||||
|
||||
public RollCallEmployeeApplication(IRollCallEmployeeRepository rollCallEmployeeRepository, IEmployeeRepository employeeRepository, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication)
|
||||
public RollCallEmployeeApplication(IRollCallEmployeeRepository rollCallEmployeeRepository, IEmployeeRepository employeeRepository, IRollCallEmployeeStatusApplication rollCallEmployeeStatusApplication, ILeftWorkRepository leftWorkRepository)
|
||||
{
|
||||
_rollCallEmployeeRepository = rollCallEmployeeRepository;
|
||||
_employeeRepository = employeeRepository;
|
||||
_rollCallEmployeeStatusApplication = rollCallEmployeeStatusApplication;
|
||||
_leftWorkRepository = leftWorkRepository;
|
||||
}
|
||||
|
||||
public OperationResult Create(CreateRollCallEmployee command)
|
||||
{
|
||||
var opreation = new OperationResult();
|
||||
|
||||
if (_rollCallEmployeeRepository.Exists(x =>
|
||||
x.EmployeeId == command.EmployeeId && x.WorkshopId == command.EmployeeId))
|
||||
return opreation.Succcedded();
|
||||
@@ -32,19 +37,31 @@ public class RollCallEmployeeApplication : IRollCallEmployeeApplication
|
||||
return opreation.Failed("پرسنل یافت نشد");
|
||||
var create = new RollCallEmployee(command.WorkshopId, command.EmployeeId, fullname.EmployeeFullName);
|
||||
_rollCallEmployeeRepository.Create(create);
|
||||
|
||||
if (command.HasUploadedImage == "true")
|
||||
create.HasImage();
|
||||
|
||||
_rollCallEmployeeRepository.SaveChanges();
|
||||
return opreation.Succcedded();
|
||||
return opreation.Succcedded(create.id);
|
||||
|
||||
}
|
||||
|
||||
public OperationResult Active(long id)
|
||||
{
|
||||
var opreation = new OperationResult();
|
||||
|
||||
var emp = _rollCallEmployeeRepository.Get(id);
|
||||
|
||||
if (emp == null)
|
||||
return opreation.Failed("پرسنل یافت نشد");
|
||||
if(emp.HasUploadedImage == "false")
|
||||
|
||||
if (!_leftWorkRepository.Exists(x => x.EmployeeId == emp.EmployeeId && x.WorkshopId == emp.WorkshopId &&
|
||||
x.StartWorkDate <= DateTime.Now && x.LeftWorkDate > DateTime.Now))
|
||||
return opreation.Failed("کارمند شروع به کار ندارد");
|
||||
|
||||
if (emp.HasUploadedImage == "false")
|
||||
return opreation.Failed("لطفا ابتدا عکس پرسنل را آپلود کنید");
|
||||
|
||||
emp.Active();
|
||||
_rollCallEmployeeRepository.SaveChanges();
|
||||
_rollCallEmployeeStatusApplication.Create(new CreateRollCallEmployeeStatus() { RollCallEmployeeId = id });
|
||||
@@ -58,8 +75,6 @@ public class RollCallEmployeeApplication : IRollCallEmployeeApplication
|
||||
if (emp == null)
|
||||
return opreation.Failed("پرسنل یافت نشد");
|
||||
var lastStatus = emp.EmployeesStatus.MaxBy(x => x.StartDate);
|
||||
if (!lastStatus.EndDate.IsDateUndefined())
|
||||
return opreation.Failed("حضور و غیاب کارمند قبلا غیر فعال شده است");
|
||||
emp.DeActive();
|
||||
_rollCallEmployeeRepository.SaveChanges();
|
||||
_rollCallEmployeeStatusApplication.Deactivate(lastStatus.id);
|
||||
@@ -72,7 +87,7 @@ public class RollCallEmployeeApplication : IRollCallEmployeeApplication
|
||||
var emp = _rollCallEmployeeRepository.Get(Employeeid);
|
||||
if (emp == null)
|
||||
return opreation.Failed("پرسنل یافت نشد");
|
||||
|
||||
|
||||
emp.HasImage();
|
||||
_rollCallEmployeeRepository.SaveChanges();
|
||||
return opreation.Succcedded();
|
||||
|
||||
@@ -32,57 +32,6 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public List<RollCallViewModel> GetCurrentDay(RollCallSearchModel searchModel)
|
||||
{
|
||||
//PersonnelCode = _context.PersonnelCodeSet.FirstOrDefault(e => e.EmployeeId == x.EmployeeId && e.WorkshopId == x.WorkshopId).PersonnelCode.ToString(),
|
||||
var rawQuery = _context.RollCalls.Where(x => x.WorkshopId == searchModel.WorkshopId && x.StartDate >= DateTime.Now.Date).Select(x => new RollCallViewModel()
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
Id = x.id,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
StartDate = x.StartDate,
|
||||
EndDate = x.EndDate,
|
||||
PersonnelCode = _context.PersonnelCodeSet
|
||||
.FirstOrDefault(a => a.EmployeeId == x.EmployeeId && a.WorkshopId == x.WorkshopId).PersonnelCode
|
||||
.ToString(),
|
||||
});
|
||||
var groupedQuery = rawQuery.GroupBy(x => x.EmployeeId).Select(x => new RollCallViewModel()
|
||||
{
|
||||
EmployeeId = x.First().EmployeeId,
|
||||
WorkshopId = x.First().WorkshopId,
|
||||
EmployeeFullName = x.First().EmployeeFullName,
|
||||
Id = x.First().Id,
|
||||
Month = x.First().Month,
|
||||
Year = x.First().Year,
|
||||
RollCallTimesList = x.Select(d => new RollCallTimeViewModel()
|
||||
{
|
||||
StartDate = d.StartDate != null ? d.StartDate.Value.ToString("HH:mm") : "--:--",
|
||||
EndDate = d.EndDate != null ? d.EndDate.Value.ToString("HH:mm") : "--:--"
|
||||
}).ToList(),
|
||||
PersonnelCode = x.First().PersonnelCode,
|
||||
}).AsEnumerable();
|
||||
var orderedEnum = groupedQuery.OrderBy(x => Convert.ToInt32(x.PersonnelCode));
|
||||
|
||||
var query = orderedEnum.Select(x => new RollCallViewModel()
|
||||
{
|
||||
EmployeeId = x.EmployeeId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EndDate = x.EndDate,
|
||||
StartDate = x.StartDate,
|
||||
Id = x.Id,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
RollCallTimesList = x.RollCallTimesList,
|
||||
PersonnelCode = x.PersonnelCode
|
||||
});
|
||||
|
||||
return query.Skip(searchModel.PageIndex).Take(30).ToList();
|
||||
}
|
||||
|
||||
public List<RollCallViewModel> Search(RollCallSearchModel searchModel)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
@@ -163,68 +112,65 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
DateTime? startDateTime, DateTime? endDateTime, DateTime? exactDateTime, DateTime? dateIndex)
|
||||
{
|
||||
|
||||
|
||||
//get RollCallEmployee and RollCallEmployeeStatus for that employee in that workshop
|
||||
var employeeRollCallStatuses = _context.RollCallEmployees.Include(x => x.EmployeesStatus)
|
||||
.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
|
||||
|
||||
//if none was found return empty
|
||||
if (employeeRollCallStatuses == null)
|
||||
return new();
|
||||
|
||||
//this list will have all the months which employee was active in
|
||||
var activeMonths = new List<PersianDateTime>();
|
||||
|
||||
//filling the list
|
||||
foreach (var status in employeeRollCallStatuses.EmployeesStatus)
|
||||
{
|
||||
var persianEndDayOfMonth = new PersianDateTime(status.EndDate.Date);
|
||||
var persianStartDayOfMonth = new PersianDateTime(status.StartDate.Date);
|
||||
var persianEndDate = new PersianDateTime(status.EndDate.Date);
|
||||
var persianStartDate = new PersianDateTime(status.StartDate.Date);
|
||||
|
||||
//var persianEndFirstDayOfMonth =
|
||||
// new PersianDateTime(persianEndDayOfMonth.Year, persianEndDayOfMonth.Month, 1);
|
||||
var persianStartFirstDayOfMonth = new PersianDateTime(persianStartDayOfMonth.Year, persianStartDayOfMonth.Month, 1);
|
||||
for (PersianDateTime start = persianStartFirstDayOfMonth; start <= persianEndDayOfMonth; start = start.AddMonths(1))
|
||||
var persianStartFirstDayOfMonth = new PersianDateTime(persianStartDate.Year, persianStartDate.Month, 1);
|
||||
|
||||
for (PersianDateTime start = persianStartFirstDayOfMonth; start <= persianEndDate && start < PersianDateTime.Today.Date; start = start.AddMonths(1))
|
||||
{
|
||||
activeMonths.Add(start);
|
||||
|
||||
}
|
||||
}
|
||||
var activeMonthsList = activeMonths.Distinct().ToList();
|
||||
//might have duplicated records, this is the reason for distinct
|
||||
var activeMonthsList = activeMonths.OrderByDescending(x => x.Date).Distinct().ToList();
|
||||
|
||||
PersianDateTime startSearch;
|
||||
PersianDateTime endSearch;
|
||||
PersianDateTime startSearch = new();
|
||||
PersianDateTime endSearch = new();
|
||||
|
||||
//if search has these parameters below
|
||||
if (startDateTime.HasValue && endDateTime.HasValue)
|
||||
{
|
||||
//change them to persian date time and save them
|
||||
startSearch = new PersianDateTime(startDateTime.Value);
|
||||
endSearch = new PersianDateTime(endDateTime.Value);
|
||||
|
||||
activeMonthsList = activeMonthsList.Where(x => x.Date >= startSearch && x.Date <= endSearch).ToList();
|
||||
//get the months that include these dates
|
||||
activeMonthsList = activeMonthsList.Where(x => x.Year >= startSearch.Year && x.Month >= startSearch.Month && x.Year <= endSearch.Year && x.Month <= endSearch.Month).ToList();
|
||||
}
|
||||
|
||||
//if exact datetime is given
|
||||
if (exactDateTime.HasValue)
|
||||
{
|
||||
//start and end will be the same date
|
||||
startSearch = new PersianDateTime(exactDateTime.Value);
|
||||
endSearch = startSearch;
|
||||
//get the
|
||||
activeMonthsList = activeMonthsList.Where(x => x.Year >= startSearch.Year && x.Month >= startSearch.Month && x.Year <= endSearch.Year && x.Month <= endSearch.Month).ToList();
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// startSearch = employeeRollCallStatuses.EmployeesStatus.Max(x => x.StartDate.Date).To;
|
||||
// endSearch = employeeRollCallStatuses.EmployeesStatus.Min(x => x.EndDate.Date);
|
||||
//}
|
||||
|
||||
|
||||
//var statusesByMonth =
|
||||
// employeeRollCallStatuses.EmployeesStatus
|
||||
// .GroupBy(x => new DateTime(Convert.ToInt32(x.StartDate.ToFarsi().Substring(0, 4)), Convert.ToInt32(x.StartDate.ToFarsi().Substring(5, 2)), 1, new PersianCalendar()).Date)
|
||||
// .OrderByDescending(x => x.Key);
|
||||
if (dateIndex != null)
|
||||
{
|
||||
var persianDateIndex = new PersianDateTime(dateIndex.Value);
|
||||
var dateIndexFirstOfMonth = persianDateIndex.AddDays(-(persianDateIndex.Day - 1));
|
||||
activeMonthsList = activeMonthsList.Where(x => dateIndexFirstOfMonth == x).OrderByDescending(x => x).ToList();
|
||||
activeMonthsList = activeMonthsList.Where(x => dateIndexFirstOfMonth >= x).ToList();
|
||||
}
|
||||
|
||||
if (!activeMonthsList.Any()) return new();
|
||||
|
||||
|
||||
//get the last month which user was active in
|
||||
PersianDateTime selectedMonthPersian = activeMonthsList.First();
|
||||
|
||||
@@ -247,51 +193,64 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate != null && x.EndDate != null &&
|
||||
x.StartDate >= selectedMonthFirstDay && x.StartDate < nextMonthFirstDay);
|
||||
|
||||
var personnelCode =
|
||||
_context.PersonnelCodeSet.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId)?.PersonnelCode;
|
||||
|
||||
var employeeName = _context.Employees.Select(x => new { x.id, x.FName, x.LName }).FirstOrDefault(x => x.id == employeeId);
|
||||
|
||||
var rollCallsList = rollCalls.ToList();
|
||||
var leavesList = leavesQuery.ToList();
|
||||
|
||||
int dateRange = (int)(nextMonthFirstDay - selectedMonthFirstDay).TotalDays;
|
||||
|
||||
var todayDate = DateTime.Now.Date;
|
||||
//all the dates from start to end, to be compared with present days to get absent dates
|
||||
var completeDaysList = Enumerable.Range(0, dateRange).Select(offset => selectedMonthFirstDay.AddDays(offset).Date);
|
||||
var result = completeDaysList.Where(x => statusesOfMonth.Any(y => x >= y.StartDate.Date && x <= y.EndDate.Date))
|
||||
.Select(x => new RollCallViewModel()
|
||||
{
|
||||
var completeDaysList = Enumerable.Range(0, dateRange).Select(offset => selectedMonthFirstDay.AddDays(offset).Date).Where(x => x.Date < todayDate);
|
||||
|
||||
DateGr = x.Date.Date,
|
||||
DateFa = x.Date.Date.ToFarsi(),
|
||||
RollCallTimesList = rollCallsList.Where(y => x.Date.Date == y.StartDate!.Value.Date).Select(y =>
|
||||
new RollCallTimeViewModel()
|
||||
{
|
||||
StartDate = y.StartDate.Value.ToString("HH:mm"),
|
||||
EndDate = y.EndDate!.Value.ToString("HH:mm")
|
||||
}),
|
||||
TotalWorkingHoursSpan = new TimeSpan(rollCallsList.Where(y => x.Date.Date == y.StartDate!.Value.Date)
|
||||
.Sum(y => (y.EndDate!.Value - y.StartDate.Value).Ticks)),
|
||||
Reason = leavesList.FirstOrDefault(y => y.EndLeave >= x.Date.Date && y.StartLeave <= x.Date.Date)?.LeaveType ?? ""
|
||||
});
|
||||
//if user search range is within a month for example, we dont want 30/31/29 days for month, we want it to be the size of the search range
|
||||
//user input = 2024/04/15~2024/04/21, output days count is 21-15+1=6 days from 15th to 21st
|
||||
if (exactDateTime.HasValue || (startDateTime.HasValue && endDateTime.HasValue))
|
||||
completeDaysList = completeDaysList.Where(x => x.Date >= startSearch.Date && x.Date <= endSearch.Date);
|
||||
var result = completeDaysList.Where(x => statusesOfMonth.Any(y => x >= y.StartDate.Date && x <= y.EndDate.Date))
|
||||
.Select(x => new RollCallViewModel()
|
||||
{
|
||||
|
||||
DateGr = x.Date.Date,
|
||||
DateFa = x.Date.Date.ToFarsi(),
|
||||
RollCallTimesList = rollCallsList.Where(y => x.Date.Date == y.StartDate!.Value.Date).Select(y =>
|
||||
new RollCallTimeViewModel()
|
||||
{
|
||||
StartDate = y.StartDate.Value.ToString("HH:mm"),
|
||||
EndDate = y.EndDate!.Value.ToString("HH:mm")
|
||||
}),
|
||||
TotalWorkingHoursSpan = new TimeSpan(rollCallsList.Where(y => x.Date.Date == y.StartDate!.Value.Date)
|
||||
.Sum(y => (y.EndDate!.Value - y.StartDate.Value).Ticks)),
|
||||
Reason = leavesList.FirstOrDefault(y => y.EndLeave >= x.Date.Date && y.StartLeave <= x.Date.Date)?.LeaveType ?? ""
|
||||
});
|
||||
result = result.Select(x => new RollCallViewModel()
|
||||
{
|
||||
EmployeeFullName = $"{employeeName?.FName} {employeeName?.LName}",
|
||||
PersonnelCode = personnelCode.ToString(),
|
||||
DateGr = x.DateGr,
|
||||
DateFa = x.DateFa,
|
||||
DayOfWeekFa = x.DateGr.DayOfWeek.DayOfWeeKToPersian(),
|
||||
IsHoliday = _holidayItemApplication.IsHoliday(x.DateGr),
|
||||
IsAbsent = !x.RollCallTimesList.Any(),
|
||||
RollCallTimesList = x.RollCallTimesList,
|
||||
TotalWorkingHours = $"{Convert.ToInt32(x.TotalWorkingHoursSpan.TotalHours)}:{x.TotalWorkingHoursSpan.Minutes.ToString("00")}",
|
||||
DateIndex = activeMonthsList.Count > 2 ? activeMonthsList.Skip(1).First().ToDateTime() : null
|
||||
}).ToList();
|
||||
return new EmployeeRollCallsByMonthViewModel()
|
||||
{
|
||||
PersianMonthName = selectedMonthPersian.ToString("MMMM"),
|
||||
PersianYear = selectedMonthPersian.ToString("yyyy"),
|
||||
DateGr = selectedMonthFirstDay,
|
||||
RollCalls = result
|
||||
RollCalls = result,
|
||||
DateIndex = activeMonthsList.Count > 1 ? activeMonthsList.Skip(1).First().ToString("yyyy/MM/dd") : null
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
//سوابق حضور غیاب کارگاه
|
||||
//dateIndex starts at 0
|
||||
public RollCallsByDateViewModel GetWorkshopRollCallHistory(RollCallSearchModel searchModel)
|
||||
{
|
||||
|
||||
@@ -431,7 +390,7 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
|
||||
//get activated employees
|
||||
var activeEmployees =
|
||||
_context.RollCallEmployees.Include(x => x.EmployeesStatus)
|
||||
.Where(x => x.WorkshopId == workshopId && x.EmployeesStatus.Any(y =>
|
||||
.Where(x => x.WorkshopId == workshopId && x.IsActiveString == "true" && x.EmployeesStatus.Any(y =>
|
||||
y.StartDate.Date <= date &&
|
||||
y.EndDate.Date >= date));
|
||||
|
||||
|
||||
@@ -410,13 +410,36 @@
|
||||
<div class="@(Model.AssignViewModels?.Count > 1 ? "col-9" : "col-12")">
|
||||
<div class="chat-section">
|
||||
<div class="chat-card-main">
|
||||
<div class="mb-2">
|
||||
<h6 class="modal-title text-start text-white" style="font-size: 14px;">طرف حساب: @Model.ContractingPartyName</h6>
|
||||
<div class="row mb-2">
|
||||
@* <h6 class="modal-title text-start text-white" style="font-size: 14px;">طرف حساب: @Model.ContractingPartyName</h6>
|
||||
<h6 class="modal-title text-start text-white" style="font-size: 14px;">عنوان وظیفه: @Model.Title</h6>
|
||||
*@
|
||||
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7">@Model.ContractingPartyName</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7">@Model.Title</span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6">@Model.CreateDateFa</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ سررسید:</span>
|
||||
<span class="@(Model.AssignViewModels?.First() != null ? "" : "taskTitleSub") text-center col-6" id="AssignEndTaskDateFa">@Model.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
@if (!String.IsNullOrWhiteSpace(Model.Description))
|
||||
{
|
||||
<div class="">
|
||||
<div class="taskDesc">
|
||||
<div>توضیحات :</div>
|
||||
@Html.Raw(Model.Description)
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -48,10 +48,16 @@
|
||||
<div class="modal-header d-block text-center header-custom-color">
|
||||
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
<div class="topColor"></div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0;font-size: 14px;">جزئیات وظیفه</h6>
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0;font-size: 14px;">@Model.TaskDetails.EndTaskDate</h6>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 text-start">
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0;font-size: 14px;">جزئیات وظیفه</h6>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<h6 class="modal-title" style="margin: 0 38px 0 0; font-size: 14px;" id="AssignTaskName">
|
||||
@(Model.TaskDetails.AssignViewModels.Count() == 1 ? Model.TaskDetails.AssignViewModels.First().AssignedName : "کل درخواستها")
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -112,7 +118,7 @@
|
||||
}
|
||||
|
||||
<button type="button" id="btnAssignList" class="btnAssignList @btnColor" data-id="@assign.Id" onclick="loadChatMessageRequest(@assign.Id)">
|
||||
<span>
|
||||
<span id="AssignedName_@assign.Id">
|
||||
@assign.AssignedName
|
||||
</span>
|
||||
<span>
|
||||
@@ -127,13 +133,32 @@
|
||||
<div id="chatSection" class="@(Model.TaskDetails.AssignViewModels?.Count > 0 && Model.TaskDetails.AssignViewModels?.Count != 1 ? "col-12 col-md-9" : "col-12") p-0">
|
||||
<div class="chat-section">
|
||||
<div class="chat-card-main">
|
||||
<div class="mb-2">
|
||||
<h6 class="modal-title text-start text-white" style="font-size: 14px;">طرف حساب: @Model.TaskDetails.ContractingPartyName</h6>
|
||||
<h6 class="modal-title text-start text-white" style="font-size: 14px;">عنوان وظیفه: @Model.TaskDetails.Title</h6>
|
||||
<div class="row mb-2">
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">طرف حساب:</span>
|
||||
<span class="taskTitleSub col-7">@Model.TaskDetails.ContractingPartyName</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-start row align-items-center">
|
||||
<span class="col-5">عنوان وظیفه:</span>
|
||||
<span class="taskTitleSub col-7">@Model.TaskDetails.Title</span>
|
||||
</h6>
|
||||
</div>
|
||||
<div class="col-6 mb-2">
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ ایجاد:</span>
|
||||
<span class="taskTitleSub text-center col-6">@Model.TaskDetails.CreateDateFa</span>
|
||||
</h6>
|
||||
<h6 class="taskTitle text-end row align-items-center">
|
||||
<span class="col-5">تاریخ سررسید:</span>
|
||||
<span class="@(Model.TaskDetails.AssignViewModels?.First() != null ? "" : "taskTitleSub") text-center col-6" id="AssignEndTaskDateFa">@Model.TaskDetails.AssignViewModels?.First().EndTaskDateFa</span>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
@if (!String.IsNullOrWhiteSpace(Model.TaskDetails.Description))
|
||||
{
|
||||
<div class="">
|
||||
<div class="taskDesc">
|
||||
<div>توضیحات :</div>
|
||||
@Html.Raw(Model.TaskDetails.Description)
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -60,11 +60,11 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
|
||||
<div class="wrapper list-box table-ticket bg-white">
|
||||
<div class="wrapper list-box table-ticket bg-white ">
|
||||
|
||||
<div class="Rtable Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex">
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky-div sticky">
|
||||
<div class="Rtable-cell column-heading width1">
|
||||
<span class="d-flex justify-content-start text-white align-items-center">
|
||||
@* <input type="checkbox" class="form-check-input checkAll me-1" name="" id="checkAll2"> *@
|
||||
|
||||
@@ -27,6 +27,14 @@
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
@@media (max-width: 767px) {
|
||||
.table-rollcall .width2 {
|
||||
width: 35% !important;
|
||||
@@ -48,7 +56,8 @@
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/select2.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/pages/rollcall/css/casehistory.css" rel="stylesheet" />
|
||||
<link href="~/assetsclient/pages/rollcall/css/casehistory.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.StyleVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +67,7 @@
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col">
|
||||
<h4 class="title d-flex align-items-center">تاریخچه حضور و غیاب</h4>
|
||||
<h4 class="title d-flex align-items-center">سوابق حضور و غیاب</h4>
|
||||
<div class="title d-flex align-items-center">@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -72,58 +81,58 @@
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row px-2">
|
||||
<div class="col-12 p-0 mb-2 d-none d-md-block">
|
||||
<div class="search-box card border-0">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div class="col-12 p-0 mb-2 d-none d-md-block">
|
||||
<div class="search-box card border-0">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
|
||||
<div class="col-3 col-xl-2">
|
||||
<div class="wrapper-dropdown-normal btn-dropdown">
|
||||
<span class="selected-display">تاریخ براساس یک روز</span>
|
||||
<svg id="drp-arrow" class="arrow transition-all ml-auto rotate-180" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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-normal dropdown-days boxes">
|
||||
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
|
||||
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div><input type="text" class="form-control date start-date text-center" id="StartDate" placeholder="تاریخ"></div>
|
||||
|
||||
<div class="d-flex align-items-center d-none" id="endDateRollcall">
|
||||
<div class="me-2 elay">الی</div>
|
||||
<input type="text" class="form-control date end-date text-center" id="EndDate" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-xl-2">
|
||||
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." id="employeeSelect">
|
||||
<option value="0">انتخاب پرسنل ...</option>
|
||||
@foreach (var itemEmployee in Model.RollCallEmployeeList)
|
||||
{
|
||||
<option value="@itemEmployee.EmployeeId">@itemEmployee.PersonName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-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" />
|
||||
<div class="col-3 col-xl-2">
|
||||
<div class="wrapper-dropdown-normal btn-dropdown">
|
||||
<span class="selected-display">تاریخ براساس یک روز</span>
|
||||
<svg id="drp-arrow" class="arrow transition-all ml-auto rotate-180" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<a asp-page="/Company/RollCall/CaseHistory" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove" style="padding: 7px 10px;">
|
||||
<span>حذف جستجو</span>
|
||||
</a>
|
||||
<ul class="dropdown-normal dropdown-days boxes">
|
||||
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
|
||||
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<div><input type="text" class="form-control date start-date text-center" id="StartDate" placeholder="تاریخ"></div>
|
||||
|
||||
<div class="d-flex align-items-center d-none" id="endDateRollcall">
|
||||
<div class="me-2 elay">الی</div>
|
||||
<input type="text" class="form-control date end-date text-center" id="EndDate" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-xl-2">
|
||||
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." id="employeeSelect">
|
||||
<option value="0">انتخاب پرسنل ...</option>
|
||||
@foreach (var itemEmployee in Model.RollCallEmployeeList)
|
||||
{
|
||||
<option value="@itemEmployee.EmployeeId">@itemEmployee.PersonName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-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>
|
||||
<a asp-page="/Company/RollCall/CaseHistory" class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable" id="filterRemove" style="padding: 7px 10px;">
|
||||
<span>حذف جستجو</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,25 +140,39 @@
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid" id="containerHeight">
|
||||
<div class="row p-lg-2">
|
||||
|
||||
|
||||
<div class="card">
|
||||
@if (@Model.RollCallViewModels.ActiveEmployees.Any())
|
||||
{
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="search-box bg-white d-block d-md-none p-1">
|
||||
<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>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
<div class="wrapper table-rollcall">
|
||||
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
|
||||
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1" >
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex stickyMain d-none d-md-flex">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading width3">شماره پرسنلی</div>
|
||||
<div class="Rtable-cell column-heading width3" id="dateFaEmployee">تاریخ</div>
|
||||
<div class="Rtable-cell column-heading width4 text-end">تاخیر در ورود</div>
|
||||
<div class="Rtable-cell column-heading width5 text-center">ورود</div>
|
||||
<div class="Rtable-cell column-heading width6 text-center">خروج</div>
|
||||
<div class="Rtable-cell column-heading width7 text-start">تجمیع در خروج</div>
|
||||
<div class="Rtable-cell column-heading width8 text-center">مجموع ساعات کاری</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100" id="caseHistoryLoadData">
|
||||
|
||||
<div class="w-100 rollcall-list Rtable Rtable--5cols Rtable--collapse" id="caseHistoryLoadData">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -166,12 +189,101 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 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">
|
||||
<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" style="overflow-y: inherit;">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div id="overlaySearchAdvance" class=""></div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-12 col-xl-12">
|
||||
<div class="wrapper-dropdown-normal btn-dropdown">
|
||||
<span class="selected-display">تاریخ براساس یک روز</span>
|
||||
<svg id="drp-arrow" class="arrow transition-all ml-auto rotate-180" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<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-normal dropdown-days boxes">
|
||||
<li class="item active" value-data-normal="OneDay">تاریخ براساس یک روز</li>
|
||||
<li class="item" value-data-normal="RangeDays">تاریخ براساس بازه ی زمانی</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="mb-2">
|
||||
<span class="form-control text-center persianDateInputStartDate" id="start-date">تاریخ شروع</span>
|
||||
<input type="hidden" class="form-control date start-date" id="StartDateMobile" placeholder="تاریخ شروع">
|
||||
</div>
|
||||
|
||||
<div class="d-block d-none" id="endDateRollcallMobile">
|
||||
<div class="mb-2">
|
||||
<div class="mx-auto text-center elay">الی</div>
|
||||
<span class="form-control text-center persianDateInputEndDate" id="end-date">تاریخ پایان</span>
|
||||
<input type="hidden" class="form-control date end-date text-center" id="EndDateMobile" placeholder="تاریخ پایان">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select class="form-select select2Option" aria-label="انتخاب پرسنل ..." id="employeeSelectMobile">
|
||||
<option value="0">انتخاب پرسنل ...</option>
|
||||
@foreach (var itemEmployee in Model.RollCallEmployeeList)
|
||||
{
|
||||
<option value="@itemEmployee.EmployeeId">@itemEmployee.PersonName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-start">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a asp-page="/Company/RollCall/CaseHistory" class="btn-clear-filter py-2 text-center d-block w-100 mt-2" id="filterRemoveMobile">
|
||||
<span class="w-100">حذف جستجو</span>
|
||||
</a>
|
||||
</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 btn-search-click w-100" id="searchBtnMobile">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@Version.StyleVersion"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var caseHistoryAjaxLoadData = `@Url.Page("./CaseHistory", "CaseHistoryRollCallAjax")`;
|
||||
var itemsYearList = @Html.Raw(Json.Serialize(Model.YearlyList.OrderBy(x => x)));
|
||||
// var dateIndex = 0;
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/casehistory.js"></script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/casehistory.js?ver=@Version.StyleVersion"></script>
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using CompanyManagment.App.Contracts.RollCall;
|
||||
using CompanyManagment.App.Contracts.RollCallEmployee;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
@@ -17,6 +18,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IRollCallEmployeeApplication _rollCallEmployeeApplication;
|
||||
private readonly IRollCallApplication _rollCallApplication;
|
||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||
|
||||
public RollCallsByDateViewModel RollCallViewModels { get; set; }
|
||||
public EmployeeRollCallsByMonthViewModel RollCallEmployeeViewModels { get; set; }
|
||||
@@ -24,14 +26,16 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
public List<RollCallEmployeeViewModel> RollCallEmployeeList;
|
||||
|
||||
public RollCallSearchModel SearchModel { get; set; } = new();
|
||||
public List<string> YearlyList { get; set; }
|
||||
|
||||
public CaseHistoryModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IWorkshopApplication workshopApplication, IRollCallApplication rollCallApplication)
|
||||
public CaseHistoryModel(IAuthHelper authHelper, IPasswordHasher passwordHasher, IRollCallEmployeeApplication rollCallEmployeeApplication, IWorkshopApplication workshopApplication, IRollCallApplication rollCallApplication, IYearlySalaryApplication yearlySalaryApplication)
|
||||
{
|
||||
_authHelper = authHelper;
|
||||
_passwordHasher = passwordHasher;
|
||||
_rollCallEmployeeApplication = rollCallEmployeeApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
_rollCallApplication = rollCallApplication;
|
||||
_yearlySalaryApplication = yearlySalaryApplication;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +56,8 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
};
|
||||
|
||||
RollCallViewModels = _rollCallApplication.GetWorkshopRollCallHistory(searchModel);
|
||||
YearlyList = _yearlySalaryApplication.GetYears();
|
||||
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -67,22 +67,6 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetCurrentDayPagination()
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
var searchModel = new RollCallSearchModel()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
};
|
||||
|
||||
var list= _rollCallApplication.GetCurrentDay(searchModel);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
list
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public IActionResult OnGetCurrentDayAjax(string type)
|
||||
|
||||
@@ -78,10 +78,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-center text-md-center">
|
||||
<p class="m-0">تعداد افراد فعال: @Model.Employees.Count(x => x.IsActiveString == "true")</p>
|
||||
<p class="m-0">تعداد افراد فعال: @Model.Employees.PersonnelInfoViewModels.Count(x => x.IsActiveString == "true")</p>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 text-center text-md-end">
|
||||
<p class="m-0 me-2">تعداد افراد غیرفعال: @Model.Employees.Count(x => x.IsActiveString == "false")</p>
|
||||
<p class="m-0 me-2">تعداد افراد غیرفعال: @Model.Employees.PersonnelInfoViewModels.Count(x => x.IsActiveString == "false")</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -99,9 +99,9 @@
|
||||
<div class="Rtable-cell column-heading width5 text-end">عملیات</div>
|
||||
</div>
|
||||
|
||||
@foreach (var item in @Model.Employees)
|
||||
@foreach (var item in @Model.Employees.PersonnelInfoViewModels)
|
||||
{
|
||||
<div class="Rtable-row align-items-center position-relative @((item.IsActiveString == "false" && item.HasUploadedImage == "false") ? "deactive" : "")">
|
||||
<div class="Rtable-row align-items-center position-relative @((item.IsActiveString == "false" && item.HasUploadedImage == "false") ? "deactive" : "") @(item.Black ? "disable" : "")">
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width1">
|
||||
<div class="Rtable-cell--heading">
|
||||
@@ -159,7 +159,7 @@
|
||||
}
|
||||
|
||||
<button class="btn-upload" type="button" onclick='ModalUploadPics(@item.EmployeeId)'>
|
||||
بارگذاری عکس
|
||||
@(item.HasUploadedImage == "true" ? "ویرایش عکس پرسنل" : "بارگذاری عکس")
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -168,7 +168,7 @@
|
||||
<div class="table-rollcall-mobile w-100 d-flex d-md-none align-items-center justify-content-between">
|
||||
<div class="d-flex justify-content-center align-items-center justify-content-between">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center" style="width: 30px;height: 30px;">
|
||||
@index
|
||||
</span>
|
||||
</div>
|
||||
@@ -176,7 +176,7 @@
|
||||
<span class="mx-2">
|
||||
@if (item.HasUploadedImage == "true")
|
||||
{
|
||||
@* <img src="data:image/jpeg;base64,@item.ImagePath" class="img-avatar" /> *@
|
||||
<img src="data:image/jpeg;base64,@item.ImagePath" class="img-avatar" />
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -185,33 +185,36 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="Rtable-cell--content my-auto">
|
||||
<div class="title-mobile">@item.EmployeeFullName</div>
|
||||
<div class="content-mobile">عکس پرسنل آپلود شده است.</div>
|
||||
<div class="title-mobile" style="width: 132px;">@item.EmployeeFullName</div>
|
||||
<div class="content-mobile">
|
||||
@if (item.HasUploadedImage == "true")
|
||||
{
|
||||
<p class="m-0">عکس پرسنل آپلود شده است</p>
|
||||
}
|
||||
else {
|
||||
<p class="m-0 text-danger">عکس پرسنل آپلود نشده است</p>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell--content d-flex justify-content-end align-items-center">
|
||||
<div class="Rtable-cell--heading d-block text-center">
|
||||
<div class="Rtable-cell--content align-items-center d-flex d-md-block text-end">
|
||||
@* @if (item.IsActiveString == "true")
|
||||
{
|
||||
<button class="btn-deactive" type="button" onclick="deactivePersonnel(@item.Id)">
|
||||
غیرفعال کردن
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn-active" type="button" onclick="activePersonnel(@item.Id, @item.HasUploadedImage)">
|
||||
فعال کردن
|
||||
</button>
|
||||
} *@
|
||||
|
||||
<button class="btn-upload-mobile text-nowrap" type="button" onclick='ModalUploadPics(@item.EmployeeId)'>
|
||||
بارگذاری عکس
|
||||
<div class="Rtable-cell--heading d-block text-center" style="width: 100px;">
|
||||
<div class="Rtable-cell--content align-items-center d-block text-end">
|
||||
<button class="btn-upload-mobile text-nowrap w-100" type="button" onclick='ModalUploadPics(@item.EmployeeId)'>
|
||||
@(item.HasUploadedImage == "true" ? "ویرایش عکس پرسنل" : "بارگذاری عکس")
|
||||
</button>
|
||||
|
||||
@* <button class="btn-upload-mobile" type="button">
|
||||
ویرایش عکس پرسنل
|
||||
</button> *@
|
||||
@if (item.IsActiveString == "true")
|
||||
{
|
||||
<button class="btn-deactive text-nowrap mt-1 w-100" type="button" onclick="deactivePersonnel(@item.Id)" style="padding: 9px 8px;font-weight: 600;font-size: 10px;">
|
||||
غیرفعال کردن
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn-active text-nowrap mt-1 w-100 @(item.HasUploadedImage == "false" ? "disable" : "")" type="button" onclick="activePersonnel(@item.Id, @item.HasUploadedImage)" style="padding: 9px 8px;font-weight: 600;font-size: 10px;">
|
||||
فعال کردن
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
public class EmployeeUploadPictureModel : PageModel
|
||||
{
|
||||
public string WorkshopFullName;
|
||||
public List<RollCallEmployeeViewModel> Employees;
|
||||
public RollCallEmployeeViewModel Employees;
|
||||
public bool HasEmployees;
|
||||
public int MaxPersonValid;
|
||||
public long WorkshopId;
|
||||
@@ -54,9 +54,21 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
|
||||
MaxPersonValid = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId).MaxPersonValid;
|
||||
|
||||
Employees = _rollCallEmployeeApplication.GetPersonnelRollCallList(workshopId);
|
||||
|
||||
HasEmployees = Employees.Count > 0 ? true : false;
|
||||
var distinctEmployees = _rollCallEmployeeApplication
|
||||
.GetPersonnelRollCallList(workshopId)
|
||||
.GroupBy(x => x.EmployeeId)
|
||||
.Select(g => g.First())
|
||||
.OrderBy(x => x.Black ? 1 : 0)
|
||||
.ThenBy(x => x.PersonelCode)
|
||||
.ToList();
|
||||
|
||||
|
||||
Employees = new RollCallEmployeeViewModel
|
||||
{
|
||||
PersonnelInfoViewModels = distinctEmployees
|
||||
};
|
||||
|
||||
HasEmployees = Employees.PersonnelInfoViewModels.Count > 0 ? true : false;
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -181,19 +181,20 @@
|
||||
<div class="row p-lg-2">
|
||||
<div class="d-grid card-area-rollcall gap-2 p-lg-0">
|
||||
|
||||
<div class="gwb-card">
|
||||
<a asp-page="/Company/RollCall/Plans" class="click loadingButton">
|
||||
<div class="gwb-card disable">
|
||||
@* asp-page="/Company/RollCall/Plans" *@
|
||||
<a class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/boxes.png" alt="" class="img-fluid mx-1" width="50px"/>
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">
|
||||
@if (!Model.CheckRollCallService)
|
||||
{
|
||||
<span>خرید سرویس</span>
|
||||
<span>خرید سرویس</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>ارتقا یا تغییر سرویس</span>
|
||||
<span>ارتقا یا تغییر سرویس</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -237,7 +238,7 @@
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/rollcall-history.png" alt="" class="img-fluid mx-1" width="50px"/>
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">تاریخچه حضور و غیاب</div>
|
||||
<div class="card-title">سوابق حضور و غیاب</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="spinner-loading loading" style="display: none;">
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
public string RollCallServiceDeadline;
|
||||
public string HasCameraAccount = "false";
|
||||
|
||||
public IndexModel(IWorkshopApplication workshopApplication, IRollCallServiceApplication rollCallServiceApplication, IRollCallEmployeeApplication rollCallEmployeeApplication, IPasswordHasher passwordHasher, ICameraAccountApplication cameraAccountApplication, IAuthHelper authHelper)
|
||||
public IndexModel(IWorkshopApplication workshopApplication, IRollCallServiceApplication rollCallServiceApplication, IRollCallEmployeeApplication rollCallEmployeeApplication, IPasswordHasher passwordHasher, ICameraAccountApplication cameraAccountApplication, IAuthHelper authHelper)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_rollCallServiceApplication = rollCallServiceApplication;
|
||||
@@ -40,34 +40,38 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
if (workshopId > 0)
|
||||
{
|
||||
WorkshopFullName = _workshopApplication.GetWorkshopInfo(workshopId).WorkshopFullName;
|
||||
var rollCall = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
|
||||
if (rollCall != null)
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var cameraAccount = _cameraAccountApplication.HasCameraAccount(workshopId, accountId);
|
||||
if (cameraAccount)
|
||||
HasCameraAccount = "true";
|
||||
var workshopHash = User.FindFirstValue("WorkshopSlug");
|
||||
var workshopId = _passwordHasher.SlugDecrypt(workshopHash);
|
||||
|
||||
CheckRollCallService = true;
|
||||
RollCallServicePersonnelActive = _rollCallEmployeeApplication.activedPerson(workshopId) > 0 ? "true" : "false";
|
||||
RollCallServiceDeadline = (rollCall.EndService.ToFarsi()).ToFarsiDuration2();
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckRollCallService = false;
|
||||
RollCallServiceDeadline = "سرویس خریداری نشده است";
|
||||
}
|
||||
return Page();
|
||||
}
|
||||
else
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
if (workshopId <= 0)
|
||||
return NotFound();
|
||||
|
||||
var workshopInfo = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
WorkshopFullName = workshopInfo.WorkshopFullName;
|
||||
|
||||
var hasBeforeService = _rollCallServiceApplication.GetAllServiceByWorkshopId(workshopId).Any();
|
||||
var rollCall = _rollCallServiceApplication.GetActiveServiceByWorkshopId(workshopId);
|
||||
|
||||
if (rollCall != null)
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var cameraAccount = _cameraAccountApplication.HasCameraAccount(workshopId, accountId);
|
||||
|
||||
if (cameraAccount && hasBeforeService)
|
||||
HasCameraAccount = "true";
|
||||
|
||||
CheckRollCallService = true;
|
||||
RollCallServicePersonnelActive = _rollCallEmployeeApplication.activedPerson(workshopId) > 0 ? "true" : "false";
|
||||
RollCallServiceDeadline = rollCall.EndService.ToFarsi().ToFarsiDuration2();
|
||||
}
|
||||
else
|
||||
{
|
||||
HasCameraAccount = !hasBeforeService ? "true" : HasCameraAccount;
|
||||
CheckRollCallService = false;
|
||||
RollCallServiceDeadline = "سرویس خریداری نشده است";
|
||||
}
|
||||
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetSaveCameraAccount()
|
||||
|
||||
@@ -7,6 +7,20 @@
|
||||
filter: grayscale(100%);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.service-invoice-section {
|
||||
height: 320px;
|
||||
}
|
||||
|
||||
@@media (min-width: 1366px) {
|
||||
.modal-dialog {
|
||||
max-width: 880px;
|
||||
}
|
||||
|
||||
.service-invoice-section {
|
||||
height: 250px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -52,7 +66,7 @@
|
||||
</div>
|
||||
|
||||
<div class="container border border-2 border-secondary rounded-bottom">
|
||||
<div class="row" style="height: 320px;">
|
||||
<div class="row service-invoice-section">
|
||||
<div class="col-12 col-lg-8 p-2">
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6 col-xl-8 order-2 order-lg-1 my-2">
|
||||
@@ -84,11 +98,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2 d-none d-lg-block border-start border-secondary p-2">
|
||||
<div class="d-flex align-items-center justify-content-evenly">
|
||||
<p class="text-muted m-0" id="AmountFaWithout">@Model.AmountFa </p>
|
||||
<p class="text-muted m-0">تومان</p>
|
||||
</div>
|
||||
<input type="hidden" id="AmountFaReal" value="@Model.AmountFa" />
|
||||
<div class="d-flex align-items-center justify-content-evenly">
|
||||
<p class="text-muted m-0" id="AmountFaWith">@Model.AmountFa</p>
|
||||
<p class="text-muted m-0">تومان</p>
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="col-xl-2 border-start border-secondary p-2">
|
||||
<div class="d-flex align-items-center justify-content-evenly">
|
||||
@@ -97,10 +110,11 @@
|
||||
</div>
|
||||
</div> *@
|
||||
<div class="col-12 col-lg-2 d-none d-lg-block border-start border-secondary p-2">
|
||||
<div class="d-flex align-items-center justify-content-evenly">
|
||||
<p class="text-muted m-0" id="AmountFaWith">@Model.AmountFa</p>
|
||||
<p class="text-muted m-0">تومان</p>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-evenly">
|
||||
<p class="text-muted m-0" id="AmountFaWithout">@Model.AmountFa </p>
|
||||
<p class="text-muted m-0">تومان</p>
|
||||
</div>
|
||||
<input type="hidden" id="AmountFaReal" value="@Model.AmountFa" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border-top border-secondary align-items-center">
|
||||
@@ -168,7 +182,7 @@
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel2" id="prev-step">انصراف</button>
|
||||
<button type="button" class="btn-cancel2 d-flex justify-content-center align-items-center" id="prev-step">انصراف</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-register" id="next-step">مرحله بعد</button>
|
||||
@@ -186,4 +200,4 @@
|
||||
var computeMoneyByMountAjax = `@Url.Page("Plans", "ComputeMoneyByMount")`;
|
||||
var sendSmsAjax = `@Url.Page("./Plans", "SendSms")`;
|
||||
</script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/modalotpaction.js"></script>
|
||||
<script src="~/assetsclient/pages/rollcall/js/modalotpaction.js?ver=4415"></script>
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
<div class="row p-lg-0 mb-2">
|
||||
<div class="d-grid card-area-rollcall2 gap-2">
|
||||
<div class="gwb-card">
|
||||
<div class="gwb-card @(Model.ActiveService?.ServiceType is "free" or "vip" ? "disable" : "")">
|
||||
<div class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/changePlan.png" alt="" class="img-fluid mx-1" width="50px"/>
|
||||
@@ -112,7 +112,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gwb-card @(Model.HasBeforeService ? "" : "disable")">
|
||||
<div class="gwb-card @(Model.ActiveService?.ServiceType is "free" or "vip" ? "disable" : "") @(Model.HasBeforeService ? "" : "disable")">
|
||||
<div class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/extensionplan.png" alt="" class="img-fluid mx-1" width="50px"/>
|
||||
@@ -125,7 +125,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gwb-card @(Model.HasBeforeService ? "" : "disable")">
|
||||
<div class="gwb-card @(Model.ActiveService?.ServiceType is "free" or "vip" ? "disable" : "") @(Model.HasBeforeService ? "" : "disable")">
|
||||
<div class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/addUser.png" alt="" class="img-fluid mx-1" width="50px"/>
|
||||
@@ -140,80 +140,83 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (!(Model.ActiveService?.ServiceType is "free" or "vip"))
|
||||
{
|
||||
<div class="row mb-2" id="paymentIncDecBox" style="display: none">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="px-3 py-2">
|
||||
<div class="d-flex-pay-rollcall align-items-center justify-content-between mb-3">
|
||||
<div class="increDecreTxt">شما میتوانید تعداد پرسنل سرویس فعلی را افزایش دهید. برای این کار از دکمه مربوطه استفاده کنید.</div>
|
||||
</div>
|
||||
<div class="d-flex-pay-rollcall align-items-center justify-content-end gap-3">
|
||||
<div>
|
||||
<span style="font-size: 12px">تعداد پرسنل قابل استفاده در پنل خریداری شده : <span id="addMaxPerson">@Model.ActiveService?.MaxPersonValid</span></span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<button class="increment" fill="currentColor">
|
||||
+
|
||||
</button>
|
||||
<input class="text-center m-0 increDecreInput" value="0" />
|
||||
<button class="decrement">
|
||||
-
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex-pay-rollcall justify-content-between align-items-center">
|
||||
<button class="payIncDec my-1">
|
||||
پرداخت
|
||||
</button>
|
||||
<div class="d-flex justify-content-end align-items-center my-1">
|
||||
<div class="increDecreTxt2 mx-3">مبلغ کل پرداخت:</div>
|
||||
<div class="increDecreTxt3">350,000 <span>تومان</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-2" id="paymentIncDecBox" style="display: none">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="px-3 py-2">
|
||||
<div class="d-flex-pay-rollcall align-items-center justify-content-between mb-3">
|
||||
<div class="increDecreTxt">شما میتوانید تعداد پرسنل سرویس فعلی را افزایش دهید. برای این کار از دکمه مربوطه استفاده کنید.</div>
|
||||
</div>
|
||||
<div class="d-flex-pay-rollcall align-items-center justify-content-end gap-3">
|
||||
<div>
|
||||
<span style="font-size: 12px">تعداد پرسنل قابل استفاده در پنل خریداری شده : <span id="addMaxPerson">@Model.ActiveService.MaxPersonValid</span></span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<button class="increment" fill="currentColor">
|
||||
+
|
||||
</button>
|
||||
<input class="text-center m-0 increDecreInput" value="0"/>
|
||||
<button class="decrement">
|
||||
-
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex-pay-rollcall justify-content-between align-items-center">
|
||||
<button class="payIncDec my-1">
|
||||
پرداخت
|
||||
</button>
|
||||
<div class="d-flex justify-content-end align-items-center my-1">
|
||||
<div class="increDecreTxt2 mx-3">مبلغ کل پرداخت:</div>
|
||||
<div class="increDecreTxt3">350,000 <span>تومان</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-grid-package" style="display: none">
|
||||
|
||||
<div class="card-grid-package" style="display: none">
|
||||
@foreach (var item in @Model.Plans)
|
||||
{
|
||||
<div class="card text-center @(item.ActivePlan ? "btn-package-card" : "border")">
|
||||
<div class="btnInner">
|
||||
<div class="d-flex justify-content-center align-items-center h-50px mb-2">
|
||||
<div class="title-package">سرویس @item.MaxPersonValid نفره</div>
|
||||
@if (item.ActivePlan)
|
||||
{
|
||||
<div class="offer-section">
|
||||
<span class="title-package-offer">پیشنهادی</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@foreach (var item in @Model.Plans)
|
||||
{
|
||||
<div class="card text-center @(item.ActivePlan ? "btn-package-card" : "border")">
|
||||
<div class="btnInner">
|
||||
<div class="d-flex justify-content-center align-items-center h-50px mb-2">
|
||||
<div class="title-package">سرویس @item.MaxPersonValid نفره</div>
|
||||
@if (item.ActivePlan)
|
||||
{
|
||||
<div class="offer-section">
|
||||
<span class="title-package-offer">پیشنهادی</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-9">
|
||||
@* <div class="d-flex justify-content-center align-items-center my-1">
|
||||
<span class="span-package"></span>
|
||||
</div> *@
|
||||
<div class="d-flex justify-content-center align-items-center mb-1">
|
||||
<span class="span-package">@item.FinalAmountRoundStr تومان</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-9">
|
||||
@* <div class="d-flex justify-content-center align-items-center my-1">
|
||||
<span class="span-package"></span>
|
||||
</div> *@
|
||||
<div class="d-flex justify-content-center align-items-center mb-1">
|
||||
<span class="span-package">@item.FinalAmountRoundStr تومان</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-3 btn-my-auto">
|
||||
<button onclick="choosePlane(@item.MaxPersonValid)" type="button" class="btn-buy" data-bs-toggle="modal" data-bs-target="#accountModal">خرید</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-3 btn-my-auto">
|
||||
<button onclick="choosePlane(@item.MaxPersonValid)" type="button" class="btn-buy" data-bs-toggle="modal" data-bs-target="#accountModal">خرید</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -199,46 +199,46 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
public IActionResult OnGetComputeMoneyByMount(string mount, string money)
|
||||
{
|
||||
var priceWithOutDiscount = "";
|
||||
var discount = "";
|
||||
//var discount = "";
|
||||
var priceWithDiscount = "";
|
||||
double computeWith = 0;
|
||||
//double computeWith = 0;
|
||||
double computeWithout = 0;
|
||||
double computeDiscount = 0;
|
||||
//double computeDiscount = 0;
|
||||
var MoneyDouble = money.MoneyToDouble();
|
||||
bool isNull = false;
|
||||
switch (mount)
|
||||
{
|
||||
case "1Mount":
|
||||
priceWithOutDiscount = MoneyDouble.ToMoney();
|
||||
discount = "0";
|
||||
priceWithDiscount = MoneyDouble.ToMoney();
|
||||
//discount = "0";
|
||||
//priceWithDiscount = MoneyDouble.ToMoney();
|
||||
isNull = true;
|
||||
break;
|
||||
case "3Mount":
|
||||
computeWith = (MoneyDouble - ((MoneyDouble * 10) / 100)) * 3;
|
||||
//computeWith = (MoneyDouble - ((MoneyDouble * 10) / 100)) * 3;
|
||||
computeWithout = MoneyDouble * 3;
|
||||
computeDiscount = ((MoneyDouble * 10) / 100) * 3;
|
||||
//computeDiscount = ((MoneyDouble * 10) / 100) * 3;
|
||||
priceWithOutDiscount = computeWithout.ToMoney();
|
||||
discount = computeDiscount.ToMoney();
|
||||
priceWithDiscount = computeWith.ToMoney();
|
||||
//discount = computeDiscount.ToMoney();
|
||||
//priceWithDiscount = computeWith.ToMoney();
|
||||
isNull = true;
|
||||
break;
|
||||
case "6Mount":
|
||||
computeWith = (MoneyDouble - ((MoneyDouble * 15) / 100)) * 6;
|
||||
//computeWith = (MoneyDouble - ((MoneyDouble * 15) / 100)) * 6;
|
||||
computeWithout = MoneyDouble * 6;
|
||||
computeDiscount = ((MoneyDouble * 15) / 100) * 6;
|
||||
//computeDiscount = ((MoneyDouble * 15) / 100) * 6;
|
||||
priceWithOutDiscount = computeWithout.ToMoney();
|
||||
discount = computeDiscount.ToMoney();
|
||||
priceWithDiscount = computeWith.ToMoney();
|
||||
//discount = computeDiscount.ToMoney();
|
||||
//priceWithDiscount = computeWith.ToMoney();
|
||||
isNull = true;
|
||||
break;
|
||||
case "12Mount":
|
||||
computeWith = (MoneyDouble - ((MoneyDouble * 20) / 100)) * 12;
|
||||
//computeWith = (MoneyDouble - ((MoneyDouble * 20) / 100)) * 12;
|
||||
computeWithout = MoneyDouble * 12;
|
||||
computeDiscount = ((MoneyDouble * 20) / 100) * 12;
|
||||
//computeDiscount = ((MoneyDouble * 20) / 100) * 12;
|
||||
priceWithOutDiscount = computeWithout.ToMoney();
|
||||
discount = computeDiscount.ToMoney();
|
||||
priceWithDiscount = computeWith.ToMoney();
|
||||
//discount = computeDiscount.ToMoney();
|
||||
//priceWithDiscount = computeWith.ToMoney();
|
||||
isNull = true;
|
||||
break;
|
||||
};
|
||||
@@ -257,7 +257,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
|
||||
IsSuccedded = true,
|
||||
Cumpute = priceWithDiscount,
|
||||
CumputeWithout = priceWithOutDiscount,
|
||||
CumputeDiscount = discount,
|
||||
//CumputeDiscount = discount,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<span>گزارشات</span>
|
||||
</a>
|
||||
</li>
|
||||
@* <li>
|
||||
<li>
|
||||
<a class="selectLi" asp-page="/Company/RollCall/Index">
|
||||
<svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="9" r="1.5" stroke="#ffffff" stroke-linecap="round" />
|
||||
@@ -98,7 +98,7 @@
|
||||
</svg>
|
||||
<span>حضور و غیاب</span>
|
||||
</a>
|
||||
</li> *@
|
||||
</li>
|
||||
<!--ّFinancial-->
|
||||
<li>
|
||||
@if (@statmentInfo.ContractingPartyId > 0 && @statmentInfo.FinancialStatmentId > 0)
|
||||
@@ -288,17 +288,23 @@
|
||||
<span class="text-nowrap d-block my-1 text-white">گزارشات</span>
|
||||
</a>
|
||||
</li>
|
||||
@* <li class="col-6 text-center p-1">
|
||||
<li class="col-6 text-center p-1">
|
||||
<a class="selectLi" asp-page="/Company/RollCall/Index">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="30" viewBox="0 0 23 20" fill="none">
|
||||
<path d="M14.5884 4.1665C15.8323 4.1665 16.4542 4.1665 16.9009 4.44739C17.0944 4.56899 17.2604 4.72524 17.3896 4.90722C17.6882 5.32759 17.6882 5.91279 17.6882 7.08317V14.9998C17.6882 16.5712 17.6882 17.3569 17.1694 17.845C16.6506 18.3332 15.8156 18.3332 14.1456 18.3332H8.83166C7.16167 18.3332 6.32667 18.3332 5.80786 17.845C5.28906 17.3569 5.28906 16.5712 5.28906 14.9998V7.08317C5.28906 5.91279 5.28906 5.32759 5.58758 4.90722C5.71681 4.72524 5.88287 4.56899 6.07628 4.44739C6.52304 4.1665 7.14498 4.1665 8.38884 4.1665" stroke="#F5F5F5" stroke-opacity="0.933333" />
|
||||
<path d="M8.83154 4.16667C8.83154 3.24619 9.62458 2.5 10.6028 2.5H12.3741C13.3524 2.5 14.1454 3.24619 14.1454 4.16667C14.1454 5.08714 13.3524 5.83333 12.3741 5.83333H10.6028C9.62458 5.83333 8.83154 5.08714 8.83154 4.16667Z" stroke="#F5F5F5" stroke-opacity="0.933333" />
|
||||
<path d="M8.83154 10L14.1454 10" stroke="#F5F5F5" stroke-opacity="0.933333" stroke-linecap="round" />
|
||||
<path d="M8.83154 13.3335L12.3741 13.3335" stroke="#F5F5F5" stroke-opacity="0.933333" stroke-linecap="round" />
|
||||
<svg width="36" height="36" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="9" r="1.5" stroke="#ffffff" stroke-linecap="round" />
|
||||
<path d="M15.701 8.25C15.8999 7.90547 16.2275 7.65408 16.6118 7.55111C16.996 7.44815 17.4055 7.50205 17.75 7.70096C18.0945 7.89987 18.3459 8.2275 18.4489 8.61177C18.5519 8.99604 18.498 9.40547 18.299 9.75C18.1001 10.0945 17.7725 10.3459 17.3882 10.4489C17.004 10.5519 16.5945 10.498 16.25 10.299C15.9055 10.1001 15.6541 9.7725 15.5511 9.38823C15.4481 9.00396 15.502 8.59453 15.701 8.25L15.701 8.25Z" stroke="#ffffff" />
|
||||
<path d="M5.70096 8.25C5.89987 7.90547 6.2275 7.65408 6.61177 7.55111C6.99604 7.44815 7.40547 7.50205 7.75 7.70096C8.09453 7.89987 8.34592 8.2275 8.44889 8.61177C8.55185 8.99604 8.49795 9.40547 8.29904 9.75C8.10013 10.0945 7.7725 10.3459 7.38823 10.4489C7.00396 10.5519 6.59453 10.498 6.25 10.299C5.90547 10.1001 5.65408 9.7725 5.55111 9.38823C5.44815 9.00396 5.50205 8.59453 5.70096 8.25L5.70096 8.25Z" stroke="#ffffff" />
|
||||
<path d="M20.3639 15.5122L20.8501 15.3957L20.3639 15.5122ZM14.1 13.1854L13.8093 12.7786L13.2769 13.1589L13.7838 13.5727L14.1 13.1854ZM15.3804 15.5097L14.8911 15.6125L15.3804 15.5097ZM19.4999 16H14.5V17H19.4999V16ZM19.8776 15.6288C19.9012 15.7271 19.8757 15.8068 19.8169 15.8717C19.7527 15.9424 19.6412 16 19.4999 16V17C20.2996 17 21.0709 16.3171 20.8501 15.3957L19.8776 15.6288ZM16.5 13C17.726 13 18.4895 13.4087 18.9822 13.9118C19.4884 14.4286 19.7475 15.0859 19.8776 15.6288L20.8501 15.3957C20.6963 14.7541 20.3754 13.9052 19.6966 13.2121C19.0043 12.5051 17.9778 12 16.5 12V13ZM14.3906 13.5922C14.8685 13.2508 15.54 13 16.5 13V12C15.3544 12 14.4745 12.3034 13.8093 12.7786L14.3906 13.5922ZM13.7838 13.5727C14.4368 14.1059 14.7483 14.9336 14.8911 15.6125L15.8697 15.4068C15.7084 14.6398 15.3299 13.5441 14.4162 12.7981L13.7838 13.5727ZM14.8911 15.6125C14.9127 15.7155 14.8843 15.801 14.8215 15.8694C14.7542 15.9427 14.641 16 14.5 16V17C15.3038 17 16.0615 16.3194 15.8697 15.4068L14.8911 15.6125Z" fill="#ffffff" />
|
||||
<path d="M9.90001 13.1854L10.2162 13.5727L10.7231 13.1589L10.1907 12.7785L9.90001 13.1854ZM3.63614 15.5122L4.12237 15.6288L3.63614 15.5122ZM8.61961 15.5097L8.1303 15.4068L8.61961 15.5097ZM7.50004 13C8.45997 13 9.13146 13.2508 9.60936 13.5922L10.1907 12.7785C9.5255 12.3033 8.64563 12 7.50004 12V13ZM4.12237 15.6288C4.25249 15.0859 4.51165 14.4286 5.01783 13.9118C5.51048 13.4087 6.27401 13 7.50004 13V12C6.02223 12 4.99575 12.5051 4.30339 13.2121C3.62456 13.9052 3.30369 14.7541 3.14991 15.3957L4.12237 15.6288ZM4.50005 16C4.3588 16 4.24729 15.9424 4.18312 15.8717C4.12432 15.8068 4.09879 15.7271 4.12237 15.6288L3.14991 15.3957C2.92906 16.3171 3.70041 17 4.50005 17V16ZM9.5 16H4.50005V17H9.5V16ZM9.5 16C9.35899 16 9.24574 15.9427 9.17843 15.8694C9.11567 15.801 9.08727 15.7155 9.10892 15.6125L8.1303 15.4068C7.93849 16.3194 8.69612 17 9.5 17V16ZM9.10892 15.6125C9.25163 14.9336 9.56317 14.1059 10.2162 13.5727L9.58379 12.7981C8.67006 13.5441 8.29153 14.6398 8.1303 15.4068L9.10892 15.6125Z" fill="#ffffff" />
|
||||
<path d="M12 12.5C14.3642 12.5 15.1314 14.3251 15.3804 15.5097C15.494 16.0501 15.0523 16.5 14.5 16.5H9.5C8.94772 16.5 8.50601 16.0501 8.61961 15.5097C8.86859 14.3251 9.63581 12.5 12 12.5Z" stroke="#ffffff" stroke-linecap="round" />
|
||||
<path d="M18.5 21.5H20C20.8284 21.5 21.5 20.8284 21.5 20V18.5" stroke="#ffffff" stroke-linecap="round" />
|
||||
<path d="M18.5 2.5H20C20.8284 2.5 21.5 3.17157 21.5 4V5.5" stroke="#ffffff" stroke-linecap="round" />
|
||||
<path d="M5.5 21.5H4C3.17157 21.5 2.5 20.8284 2.5 20V18.5" stroke="#ffffff" stroke-linecap="round" />
|
||||
<path d="M5.5 2.5H4C3.17157 2.5 2.5 3.17157 2.5 4V5.5" stroke="#ffffff" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span class="text-nowrap d-block my-1 text-white">حضور و غیاب</span>
|
||||
<span class="text-nowrap d-block my-1 text-white">حضور و غیاب</span>
|
||||
</a>
|
||||
</li> *@
|
||||
</li>
|
||||
<!--ّFinancial-->
|
||||
<li class="col-6 text-center p-1">
|
||||
@if (@statmentInfo.ContractingPartyId > 0 && @statmentInfo.FinancialStatmentId > 0)
|
||||
|
||||
@@ -48,10 +48,26 @@ namespace ServiceHost.Pages
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
_authHelper.SignOut();
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -168,7 +168,7 @@ app.UseAuthorization();
|
||||
|
||||
#region Mahan
|
||||
|
||||
app.UseLoginHandlerMiddleware();
|
||||
//app.UseLoginHandlerMiddleware();
|
||||
|
||||
//app.UseCheckTaskMiddleware();
|
||||
#endregion
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\CreateCRUDTaskSubjectModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\CreateModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\DetailsModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\DetailsModalOld.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\DetailsTaskTicketsModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\DiagramTaskModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\Edit.cshtml" />
|
||||
@@ -96,6 +97,7 @@
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\OperationModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\OperationRequestModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\OperationRequestModalOld.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Ticket\DetailTicketModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Ticket\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_Header.cshtml" />
|
||||
@@ -114,6 +116,7 @@
|
||||
<None Include="Areas\Client\Pages\Company\Checkouts\PrintOne.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Checkouts\PrintOneMobile.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Checkouts\PrintOneRollCall.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Checkouts\_Partials\PrintDetailsRollCallRaw.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Contracts\AutoExtension.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Contracts\clock.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Contracts\ContractList.cshtml" />
|
||||
|
||||
BIN
ServiceHost/Storage/Task/496/test_638614269938768839.jpg
Normal file
BIN
ServiceHost/Storage/Task/496/test_638614269938768839.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 436 KiB |
@@ -12,7 +12,7 @@
|
||||
//"MesbahDb": "Data Source=DESKTOP-NUE119G\\MSNEW;Initial Catalog=Mesbah_db;Integrated Security=True"
|
||||
|
||||
//server
|
||||
//"MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
|
||||
// "MesbahDb": "Data Source=171.22.24.15;Initial Catalog=mesbah_db;Persist Security Info=False;User ID=ir_db;Password=R2rNp[170]is[3019]#@ATt;TrustServerCertificate=true;"
|
||||
|
||||
//local
|
||||
"MesbahDb": "Data Source=.;Initial Catalog=Mesbah_db;Integrated Security=True;TrustServerCertificate=true;"
|
||||
|
||||
@@ -72,6 +72,8 @@
|
||||
background-color: #ffffff;
|
||||
padding: 3px 6px;
|
||||
border-radius: 5px;
|
||||
height: 90px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.taskDesc div {
|
||||
|
||||
@@ -396,6 +396,11 @@
|
||||
.ellipsed {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content > span {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 344px) {
|
||||
|
||||
@@ -822,8 +822,13 @@
|
||||
.table-task-manager .Rtable .Rtable-row .width1 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.table-task-manager .Rtable .Rtable-row .width5 {
|
||||
width: 50% !important;
|
||||
width: 27% !important;
|
||||
}
|
||||
|
||||
.operation-div .operations-btns .btn1,
|
||||
|
||||
@@ -332,7 +332,7 @@ function loadChatMessage(id) {
|
||||
<h6 class="m-0" style="${senderOrReceiver === 'receiver' && Number(UserId) === item.receiverId ? 'padding:0 0 0 0;' : ''}">
|
||||
${item.senderName}
|
||||
</h6>
|
||||
<p class="mb-0 mt-2" style="${senderOrReceiver === 'receiver' && Number(UserId) === item.receiverId ? 'padding:0 0 0 0;' : ''}">
|
||||
<p class="mb-0 mt-2" style="word-break: break-word; ${senderOrReceiver === 'receiver' && Number(UserId) === item.receiverId ? 'padding:0 0 0 0;' : ''}">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0" style="${senderOrReceiver === 'receiver' && Number(UserId) === item.receiverId ? 'padding:0 0 0 0;' : ''}">${item.creationDate}</p>
|
||||
@@ -350,7 +350,7 @@ function loadChatMessage(id) {
|
||||
<h6 class="m-0" style="${senderOrReceiver === 'receiver' && Number(UserId) === item.senderId ? 'padding:0 20px 0 0;' : ''}">
|
||||
${item.senderName}
|
||||
</h6>
|
||||
<p class="mb-0 mt-2" style="${senderOrReceiver === 'receiver' && Number(UserId) === item.senderId ? 'padding:0 20px 0 0;' : ''}">
|
||||
<p class="mb-0 mt-2" style="word-break: break-word; ${senderOrReceiver === 'receiver' && Number(UserId) === item.senderId ? 'padding:0 20px 0 0;' : ''}">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0" style="${senderOrReceiver === 'receiver' && Number(UserId) === item.senderId ? 'padding:0 20px 0 0;' : ''}">${item.creationDate}</p>
|
||||
|
||||
@@ -370,7 +370,7 @@ function loadChatMessage(id) {
|
||||
<h6 class="m-0">
|
||||
${item.senderName}
|
||||
</h6>
|
||||
<p class="mb-0 mt-2">
|
||||
<p class="mb-0 mt-2" style="word-break: break-word;">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0">${item.creationDate}</p>
|
||||
@@ -388,7 +388,7 @@ function loadChatMessage(id) {
|
||||
<h6 class="m-0">
|
||||
${item.senderName}
|
||||
</h6>
|
||||
<p class="mb-0 mt-2">
|
||||
<p class="mb-0 mt-2" style="word-break: break-word;">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0">${item.creationDate}</p>
|
||||
|
||||
@@ -78,9 +78,13 @@ function buildTree(assignments) {
|
||||
|
||||
if (assignerId !== assignedId) {
|
||||
assignerNode.children.push(assignedNode);
|
||||
} else {
|
||||
assignerNode.children.push({ id: assignedNode.id, name: assignedNode.name, children: [] });
|
||||
}
|
||||
|
||||
//برای نمایش ارجاع به خود
|
||||
|
||||
//else {
|
||||
// assignerNode.children.push({ id: assignedNode.id, name: assignedNode.name, children: [] });
|
||||
//}
|
||||
});
|
||||
|
||||
return root;
|
||||
|
||||
@@ -554,6 +554,32 @@ function loadMore(type) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-md-none d-block width4">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="tooltipfull-container">
|
||||
<p class="m-0 ellipsed">
|
||||
<span>${item.assigner}</span>
|
||||
</p>
|
||||
</div>
|
||||
<span class="tooltipfull" >
|
||||
${item.assigner}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-md-none d-block width4">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="tooltipfull-container">
|
||||
<p class="m-0 ellipsed">
|
||||
<span>${item.assignedReceiverViewModel.assignedName}</span>
|
||||
</p>
|
||||
</div>
|
||||
<span class="tooltipfull" >
|
||||
${item.assignedReceiverViewModel.assignedName}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-block d-flex width5 text-start">
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="tooltipfull-container">
|
||||
@@ -643,9 +669,9 @@ function loadMore(type) {
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
<button class="btn-taskmanager-more position-relative d-md-none d-block">
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center">
|
||||
<p class="my-0 mx-1">عملیات</p>
|
||||
<button class="btn-taskmanager-more position-relative d-md-none d-block" style="width: 28px;">
|
||||
<span class="align-items-center d-flex justify-content-center">
|
||||
<p class="my-0"></p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
|
||||
@@ -681,9 +707,9 @@ function loadMore(type) {
|
||||
<path d="M3.3335 4.66797V4.66797C3.3335 5.28795 3.3335 5.59794 3.40164 5.85227C3.58658 6.54246 4.12567 7.08155 4.81586 7.26649C5.07019 7.33464 5.38018 7.33464 6.00016 7.33464H9.3335" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button class="btn-taskmanager-more position-relative" onclick="Detail(${item.id})">
|
||||
<button class="btn-taskmanager-more position-relative" onclick="Detail(${item.id})" style="width: 28px;>
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center">
|
||||
<p class="my-0 mx-1">مشاهده</p>
|
||||
<p class="my-0 mx-1 d-none d-md-block">مشاهده</p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"/>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"/>
|
||||
@@ -766,7 +792,7 @@ function loadMore(type) {
|
||||
<path d="M5.34863 8.30469H8.91426" stroke="#64748B" stroke-linecap="round"/>
|
||||
<path d="M5.34863 10.7969H7.72572" stroke="#64748B" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="mx-1 d-flex">جزئیات</span>
|
||||
<span class="mx-1 d-flex">عملیات</span>
|
||||
</button>
|
||||
<button class="btn-taskmanager-diagram-mobile w-100 mx-1 d-md-none d-flex align-items-center justify-content-center" onclick="DiagramDetail(${item.id})">
|
||||
<svg width="18" height="18" viewBox="0 0 13 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
|
||||
@@ -26,6 +26,8 @@ $(".date").on('input', function () {
|
||||
|
||||
function showAllRequestAction() {
|
||||
//$('.admincardActionSection').css('position', 'sticky');
|
||||
$('#AssignTaskName').text(`کل درخواستها`);
|
||||
|
||||
$('#ajaxChatSection').html('');
|
||||
$('.admincardActionSection').addClass('position-relative');
|
||||
$('.admincardAction').show();
|
||||
@@ -34,6 +36,8 @@ function showAllRequestAction() {
|
||||
function loadChatMessageRequest(id) {
|
||||
//$('.admincardActionSection').css('position', 'absolute');
|
||||
|
||||
$('#AssignTaskName').text($(`#AssignedName_${id}`).text());
|
||||
|
||||
$('#ajaxChatSection').html('');
|
||||
|
||||
$('.admincardAction').hide();
|
||||
@@ -98,10 +102,10 @@ function loadChatMessageRequest(id) {
|
||||
<h6 class="m-0" style="${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">
|
||||
${item.senderName}
|
||||
</h6>
|
||||
<p class="m-0 mt-2" style="${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">
|
||||
<p class="m-0 mt-2" style="word-break: break-word; ${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0" style="${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">${item.creationDate}</p>
|
||||
<p class="date-time pt-3 m-0" style="word-break: break-word; ${Number(UserId) === item.receiverId ? 'padding:0 20px 0 0;' : ''}">${item.creationDate}</p>
|
||||
<div class="chat-tag" style="${Number(UserId) === item.receiverId ? 'right: 0;left: auto;' : ''}">
|
||||
<span>
|
||||
${item.typeOfMessage}
|
||||
@@ -112,7 +116,7 @@ function loadChatMessageRequest(id) {
|
||||
} else {
|
||||
html += `
|
||||
<div class="chat-card-sender ${color}">
|
||||
<p class="m-0 mt-4">
|
||||
<p class="m-0 mt-4" style="word-break: break-word;">
|
||||
${item.message}
|
||||
</p>
|
||||
<p class="date-time pt-3 m-0">${item.creationDate}</p>
|
||||
|
||||
@@ -0,0 +1,474 @@
|
||||
|
||||
$(document).ready(function () {
|
||||
$('.loading').hide();
|
||||
|
||||
|
||||
// --------------------------------------------- درخواست مهلت ---------------------------------------------
|
||||
$('#checkActiveDate').on('change', function () {
|
||||
if ($('#checkActiveDate').is(':checked')) {
|
||||
$('#inputChangeDate').removeClass('disable');
|
||||
$('.btn-change-date').removeClass('disable');
|
||||
$('#inputChangeDate').prop('disabled', false);
|
||||
$('#inputChangeDate').focus();
|
||||
$('.btn-change-date').prop('disabled', false);
|
||||
} else {
|
||||
$('#inputChangeDate').val('');
|
||||
$('#inputChangeDate').addClass('disable');
|
||||
$('.btn-change-date').addClass('disable');
|
||||
$('#inputChangeDate').prop('disabled', true);
|
||||
$('.btn-change-date').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('#saveChangeTimeRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
var inputChangeDate = $("#inputChangeDate").val().trim();
|
||||
|
||||
if (inputChangeDate.length == 10 && inputChangeDate != '') {
|
||||
console.log(inputChangeDate);
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: changeTime,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { taskId: Number(TaskId), time: inputChangeDate },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text("لطفا تاریخ را وارد نمائید.");
|
||||
$("#inputChangeDate").addClass('errored');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$("#inputChangeDate").removeClass('errored');
|
||||
}, 3500);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#saveAcceptTimeRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: AcceptTimeRequest,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { id: Number(TaskId) },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#saveRejectTimeRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: RejectTimeRequest,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { id: Number(TaskId) },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
//$(".date").mask("0000/00/00");
|
||||
$(".date").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("0000/00/00");
|
||||
|
||||
$(".date").keyup(function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (lengthValue == 10) {
|
||||
if (!dateValidcheck(this)) {
|
||||
$(this).addClass("errored");
|
||||
} else {
|
||||
$(this).removeClass("errored");
|
||||
}
|
||||
} else if (lengthValue == 0) {
|
||||
$(this).removeClass("errored");
|
||||
}
|
||||
});
|
||||
|
||||
function dateValidcheck(inputField1) {
|
||||
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = inputField1.value;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
let s1, s2;
|
||||
for (var i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 4) {
|
||||
s1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 7) {
|
||||
s2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
||||
let test1 = checkEnValid(inputField1.value);
|
||||
|
||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
||||
|
||||
|
||||
if (isValid && test1) {
|
||||
// inputField1.style.backgroundColor = '#a6e9a6';
|
||||
start1valid = true;
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
if (inputField1.value != "") {
|
||||
// inputField1.style.backgroundColor = '#f94c4c';
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
||||
start1valid = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return start1valid;
|
||||
|
||||
}
|
||||
|
||||
function checkEnValid(fixDate1) {
|
||||
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = fixDate1;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
for (let i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let kabiseh = false;
|
||||
if (month <= 6 && day > 31) {
|
||||
return false;
|
||||
} else if (month > 6 && month < 12 && day > 30) {
|
||||
return false;
|
||||
} else if (month === 12) {
|
||||
|
||||
switch (year) {
|
||||
case 1346:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1350:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1354:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1358:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1362:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1366:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1370:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1375:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1379:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1383:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1387:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1391:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1395:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1399:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1403:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1408:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1412:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1416:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1420:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1424:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1428:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1432:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1436:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1441:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1445:
|
||||
kabiseh = true;
|
||||
break;
|
||||
default:
|
||||
kabiseh = false;
|
||||
|
||||
}
|
||||
if (kabiseh == true && day > 30) {
|
||||
return false;
|
||||
} else if (kabiseh == false && day > 29) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$('.date').on("keyup", function () {
|
||||
var isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
||||
if (isValid) {
|
||||
$(this).addClass("validTime");
|
||||
$(this).removeClass("invalidTime");
|
||||
// if ($('#EndTaskTime').val() != null) {
|
||||
// computeDays();
|
||||
// }
|
||||
} else {
|
||||
$(this).removeClass("validTime");
|
||||
$(this).addClass("invalidTime");
|
||||
}
|
||||
});
|
||||
// --------------------------------------------- درخواست مهلت ---------------------------------------------
|
||||
|
||||
// --------------------------------------------- درخواست انصراف وظیفه ---------------------------------------------
|
||||
$('#saveRejectCancelRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: RejectCancel,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { id: Number(TaskId) },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#saveAcceptCancelRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: AcceptCancel,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { id: Number(TaskId) },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
// --------------------------------------------- درخواست انصراف وظیفه ---------------------------------------------
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------- درخواست تائید وظیفه ---------------------------------------------
|
||||
$('#saveRejectCompleteRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: RejectComplete,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { id: Number(TaskId) },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#saveAcceptCompleteRequest').on('click', function () {
|
||||
var TaskId = $("#TaskId").val();
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: AcceptComplete,
|
||||
headers: { "RequestVerificationToken": AntiForgeryToken },
|
||||
data: { id: Number(TaskId) },
|
||||
success: function (response) {
|
||||
if (response.isSuccess) {
|
||||
$('#MainModal').modal('hide');
|
||||
$('.hideDivRequest' + TaskId).remove();
|
||||
loadMoreRequest();
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
});
|
||||
// --------------------------------------------- درخواست تائید وظیفه ---------------------------------------------
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 10px;
|
||||
font-weight:700;
|
||||
color: #0B5959;
|
||||
color: #000000;
|
||||
white-space: nowrap;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
|
||||
.table-rollcall .width4 {
|
||||
width: 10% !important;
|
||||
width: 4% !important;
|
||||
}
|
||||
.rollcall-list.Rtable .Rtable-row .Rtable-cell.width4 .Rtable-cell--content {
|
||||
/*justify-content: end;*/
|
||||
@@ -69,17 +69,17 @@
|
||||
|
||||
|
||||
.table-rollcall .width5 {
|
||||
width: 10% !important;
|
||||
width: 5% !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-rollcall .width6 {
|
||||
width: 10% !important;
|
||||
width: 5% !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table-rollcall .width7 {
|
||||
width: 10% !important;
|
||||
width: 4% !important;
|
||||
}
|
||||
|
||||
.rollcall-list.Rtable .Rtable-row .Rtable-cell.width7 .Rtable-cell--content {
|
||||
@@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
.table-rollcall .width8 {
|
||||
width: 15% !important;
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width4.bg-filter,
|
||||
@@ -109,7 +109,7 @@
|
||||
.Rtable .Rtable-row .Rtable-cell.width1 .Rtable-cell--content,
|
||||
.Rtable .Rtable-row .Rtable-cell.width2 .Rtable-cell--content {
|
||||
font-size: 10px;
|
||||
color: #0B5959;
|
||||
color: #000000;
|
||||
white-space: nowrap;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
@@ -137,6 +137,42 @@
|
||||
border-bottom-left-radius: 15px;
|
||||
}*/
|
||||
|
||||
.Rtable-row.firstRadius .width4:before {
|
||||
border-radius: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.Rtable-row.lastRadius .width4:before {
|
||||
border-radius: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.Rtable-row.radius .width4:before {
|
||||
border-radius: 0 10px 10px 0 !important;
|
||||
}
|
||||
|
||||
.Rtable-row.firstRadius .width7:before {
|
||||
border-radius: 10px 0 0 0;
|
||||
}
|
||||
|
||||
.Rtable-row.lastRadius .width7:before {
|
||||
border-radius: 0 0 0 10px;
|
||||
}
|
||||
|
||||
.Rtable-row.radius .width7:before {
|
||||
border-radius: 10px 0 0 10px !important;
|
||||
}
|
||||
|
||||
.Rtable-row.firstRadius .width8:before {
|
||||
border-radius: 10px 10px 0 0;
|
||||
}
|
||||
|
||||
.Rtable-row.lastRadius .width8:before {
|
||||
border-radius: 0 0 10px 10px;
|
||||
}
|
||||
|
||||
.Rtable-row.radius .width8:before {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
|
||||
.table-rollcall .width4:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
@@ -144,7 +180,6 @@
|
||||
left: 0%;
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
border-radius: 0 7px 7px 0;
|
||||
/*background-color: #aeeaeab8;*/
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -157,7 +192,7 @@
|
||||
left: 0%;
|
||||
width: 95%;
|
||||
height: 100%;
|
||||
border-radius: 0 7px 7px 0;
|
||||
border-radius: 0 0 0 0;
|
||||
/*background-color: #aeeaeab8;*/
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -169,7 +204,7 @@
|
||||
right: 0%;
|
||||
width: 95%;
|
||||
height: 100%;
|
||||
border-radius: 7px 0 0 7px;
|
||||
border-radius: 0 0 0 0;
|
||||
/*background-color: #aeeaeab8;*/
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -181,7 +216,6 @@
|
||||
right: 0%;
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
border-radius: 7px 0 0 7px;
|
||||
/*background-color: #aeeaeab8;*/
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -190,10 +224,9 @@
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0%;
|
||||
width: 90%;
|
||||
left: 20px;
|
||||
width: 83%;
|
||||
height: 100%;
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
/*background-color: #aeeaeab8;*/
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
@@ -304,16 +337,16 @@
|
||||
|
||||
.Rtable .Rtable-row.absenceItem {
|
||||
background-color: #FEE2E2;
|
||||
color: #716969;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row.absenceItem .Rtable-cell .Rtable-cell--content > .table-number {
|
||||
background-color: #FCA5A5;
|
||||
color: #716969;
|
||||
color: #020202;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row.absenceItem .Rtable-cell .Rtable-cell--content {
|
||||
color: #716969;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row.absenceItem:hover {
|
||||
@@ -337,17 +370,17 @@
|
||||
|
||||
.Rtable .Rtable-row.leaveItem {
|
||||
background-color: #FEF3C7;
|
||||
color: #716969;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row.leaveItem .Rtable-cell .Rtable-cell--content {
|
||||
color: #716969;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
||||
.Rtable .Rtable-row.leaveItem .Rtable-cell .Rtable-cell--content > .table-number {
|
||||
background-color: #FCD34D;
|
||||
color: #716969;
|
||||
color: #020202;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row.leaveItem:hover {
|
||||
|
||||
@@ -336,7 +336,7 @@
|
||||
background-color: #F0F0F0;
|
||||
border-radius: 12px;
|
||||
padding: 10px;
|
||||
height: 500px;
|
||||
height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,73 +13,75 @@
|
||||
});
|
||||
|
||||
$("#next-step").on("click", function () {
|
||||
$('#step-form1').hide();
|
||||
$('#step-form2').show();
|
||||
$('#prev-step').text('مرحله قبل');
|
||||
$('#next-step').text('ثبت');
|
||||
// $('#next-step').addClass('disable')
|
||||
$('#step-2').removeClass('not-step');
|
||||
});
|
||||
$('#step-form1').hide();
|
||||
$('#step-form2').show();
|
||||
$('#prev-step').text('مرحله قبل');
|
||||
$('#next-step').text('ثبت');
|
||||
// $('#next-step').addClass('disable')
|
||||
$('#step-2').removeClass('not-step');
|
||||
});
|
||||
|
||||
$("#prev-step").on("click", function () {
|
||||
$('#step-form1').show();
|
||||
|
||||
if ($('#step-form2').is(":hidden")) {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
if ($('#step-form2').is(":hidden")) {
|
||||
$("#MainModal").modal("hide");
|
||||
}
|
||||
|
||||
$('#step-form2').hide();
|
||||
$('#prev-step').text('انصراف');
|
||||
$('#next-step').text('مرحله بعد');
|
||||
$('#step-2').addClass('not-step');
|
||||
|
||||
});
|
||||
$('#step-form2').hide();
|
||||
$('#prev-step').text('انصراف');
|
||||
$('#next-step').text('مرحله بعد');
|
||||
$('#step-2').addClass('not-step');
|
||||
});
|
||||
|
||||
$("#time-code").on('input', function () {
|
||||
var value = $(this).val();
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("000000");
|
||||
$(this).val(convertPersianNumbersToEnglish(value));
|
||||
}).mask("000000");
|
||||
|
||||
$('#changeDuration').on('change', function () {
|
||||
|
||||
if (this.value == "1Mount") {
|
||||
$('#Duration').val('یک ماهه');
|
||||
} else if (this.value == "3Mount") {
|
||||
$('#Duration').val('سه ماهه');
|
||||
} else if (this.value == "6Mount") {
|
||||
$('#Duration').val('شش ماهه');
|
||||
} else if (this.value == "12Mount") {
|
||||
$('#Duration').val('یک ساله');
|
||||
}
|
||||
|
||||
if (this.value == "1Mount") {
|
||||
$('#Duration').val('یک ماهه');
|
||||
} else if (this.value == "3Mount") {
|
||||
$('#Duration').val('سه ماهه');
|
||||
} else if (this.value == "6Mount") {
|
||||
$('#Duration').val('شش ماهه');
|
||||
} else if (this.value == "12Mount") {
|
||||
$('#Duration').val('یک ساله');
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
url: computeMoneyByMountAjax,
|
||||
type: 'GET',
|
||||
data: {"mount": this.value, "money": $('#AmountFaReal').val() },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.isSuccedded) {
|
||||
$('#AmountFaWithout').text(response.cumputeWithout);
|
||||
$('#AmountFaDiscount').text(response.cumputeDiscount);
|
||||
$('#AmountFaWith').text(response.cumpute);
|
||||
$('#AmountFaTotal').text(response.cumpute);
|
||||
$('#AmountFa').text(response.cumpute);
|
||||
} 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);
|
||||
}
|
||||
});
|
||||
});
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
url: computeMoneyByMountAjax,
|
||||
type: 'GET',
|
||||
data: {"mount": this.value, "money": $('#AmountFaReal').val() },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
$('#AmountFaWithout').text(response.cumputeWithout);
|
||||
//$('#AmountFaDiscount').text(response.cumputeDiscount);
|
||||
$('#AmountFaWith').text(response.cumputeWithout);
|
||||
$('#AmountFaTotal').text(response.cumputeWithout);
|
||||
$('#AmountFa').text(response.cumputeWithout);
|
||||
// برای تخفیف محاسبه میشد
|
||||
//$('#AmountFaWith').text(response.cumpute);
|
||||
//$('#AmountFaTotal').text(response.cumpute);
|
||||
//$('#AmountFa').text(response.cumpute);
|
||||
} 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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#btnSmsReciver').on("click", function () {
|
||||
$('#btnSmsReciver').prop("disabled", true);
|
||||
|
||||
Reference in New Issue
Block a user