Compare commits

..

5 Commits

26 changed files with 164 additions and 36 deletions

View File

@@ -204,8 +204,7 @@ public class SmsService : ISmsService
int pageSize = 100; // max: 100
SmsIr smsIr = new SmsIr("Og5M562igmzJRhQPnq0GdtieYdLgtfikjzxOmeQBPxJjZtyge5Klc046Lfw1mxSa");
var response = await smsIr.GetArchivedReportAsync(pageNumber, pageSize, unixTimestamp, unixTimestamp2);
MessageReportResult[] messages = response.Data;
foreach (var message in messages)
{

View File

@@ -12,9 +12,7 @@ public class CaseHistoryRollCallExcelForEmployeeViewModel
public string EmployeeFullName { get; set; }
public string TotalWorkingHoursFa { get; set; }
public string TotalWorkingTimeSpan { get; set; }
public List<RollCallItemForEmployeeExcelViewModel> RollCalls { get; set; }
}
@@ -40,7 +38,8 @@ public class RollCallItemForEmployeeExcelViewModel
public bool HasLeave { get; set; }
public string TotalWorkingHours { get; set; }
public string EnterTimeDifferences { get; set; }
public string ExitTimeDifferences { get; set; }
}
public class RollCallTimeExcelViewModel

View File

@@ -113,11 +113,12 @@ public class RollCallExcelGenerator : ExcelGenerator
worksheet.Cells[i + row + 1, 1].Value = i + 1;
worksheet.Cells[i + row + 1, 2].Value = rollCall.DayOfWeekFa;
worksheet.Cells[i + row + 1, 3].Value = rollCall.DateFa;
worksheet.Cells[i + row + 1, 4].Value = "-";
worksheet.Cells[i + row + 1, 4].Value = rollCall.EnterTimeDifferences;
worksheet.Cells[i + row + 1, 5].Value = rollCall.StartsItems;
worksheet.Cells[i + row + 1, 6].Value = rollCall.EndsItems;
worksheet.Cells[i + row + 1, 7].Value = "-";
worksheet.Cells[i + row + 1, 8].Value = rollCall.TotalWorkingHours == string.Empty ? "ندارد" : rollCall.TotalWorkingHours;
worksheet.Cells[i + row + 1, 7].Value = rollCall.ExitTimeDifferences;
worksheet.Cells[i + row + 1, 8].Value = rollCall.TotalWorkingHours == string.Empty
? "ندارد" : rollCall.TotalWorkingHours;
// Style data cells
for (int j = 1; j <= 8; j++)
@@ -307,6 +308,49 @@ public class RollCallExcelGenerator : ExcelGenerator
return package.GetAsByteArray();
}
private string CalculateExitMinuteDifference(TimeSpan early, TimeSpan late)
{
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
{
return "-";
}
else if (late != TimeSpan.Zero)
{
var minutes = late.TotalMinutes > 999 ? "999" : late.TotalMinutes.ToString();
return $"{minutes}+";
}
else if (early != TimeSpan.Zero)
{
var minutes = early.TotalMinutes > 999 ? "999" : early.TotalMinutes.ToString();
return $"{minutes}-";
}
else
{
return $"";
}
}
private string CalculateEntryMinuteDifference(TimeSpan early, TimeSpan late)
{
if (early == TimeSpan.Zero && late == TimeSpan.Zero)
{
return "-";
}
else if (late != TimeSpan.Zero)
{
var minutes = late.TotalMinutes > 999 ? "999" : late.TotalMinutes.ToString();
return $"{minutes}-";
}
else if (early != TimeSpan.Zero)
{
var minutes = early.TotalMinutes > 999 ? "999" : early.TotalMinutes.ToString();
return $"{minutes}+";
}
else
{
return $"";
}
}
}

View File

@@ -238,6 +238,8 @@ public interface IInstitutionContractApplication
#endregion
Task<OperationResult> ResendVerifyLink(long institutionContractId);
}
public class InsitutionContractAmendmentPaymentRequest

View File

@@ -1345,6 +1345,28 @@ public class InstitutionContractApplication : IInstitutionContractApplication
return _institutionContractRepository.GetAmendmentPaymentDetails(request);
}
public async Task<OperationResult> ResendVerifyLink(long institutionContractId)
{
var institutionContract = _institutionContractRepository.Get(institutionContractId);
if (institutionContract == null)
{
throw new NotFoundException("رکورد مورد نظر یافت نشد");
}
if (institutionContract.VerificationStatus != InstitutionContractVerificationStatus.PendingForVerify)
{
throw new BadRequestException("این قرارداد مالی در وضعیت مناسبی برای ارسال مجدد لینک تایید نمی باشد");
}
var contractingParty = _contractingPartyRepository.Get(institutionContract.ContractingPartyId);
if (contractingParty == null)
throw new NotFoundException("طرف قرارداد یافت نشد");
var contractingPartyFullName = contractingParty.FName + " " + contractingParty.LName;
await _smsService.SendInstitutionVerificationLink(contractingParty.Phone, contractingPartyFullName,
institutionContract.PublicId);
return new OperationResult().Succcedded();
}
private async Task<OperationResult<PersonalContractingParty>> CreateLegalContractingPartyEntity(
CreateInstitutionContractLegalPartyRequest request, long representativeId, string address, string city,

View File

@@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AccountManagement.Application.Contracts.SubAccount;
using ZstdSharp.Unsafe;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace CompanyManagment.EFCore.Repository;
@@ -266,14 +267,26 @@ public class FinancialStatmentRepository : RepositoryBase<long, FinancialStatmen
public async Task<FinancialStatmentDetailsByContractingPartyViewModel> GetDetailsByContractingParty(long contractingPartyId,FinancialStatementSearchModel searchModel)
{
var contractingParty = await _context.PersonalContractingParties
.FirstOrDefaultAsync(x=>x.id == contractingPartyId);
if (contractingParty == null)
throw new NotFoundException("طرف حساب یافت نشد");
var financialStatement = await _context.FinancialStatments
.Include(x=>x.FinancialTransactionList)
.FirstOrDefaultAsync(x=>x.ContractingPartyId == contractingPartyId);
if (financialStatement == null)
{
throw new NotFoundException("وضعیت مالی مورد نظر یافت نشد");
financialStatement = new FinancialStatment(contractingPartyId,contractingParty.FName+" "+contractingParty.LName);
await _context.AddAsync(financialStatement);
await _context.SaveChangesAsync();
}
bool searched = false;
#region Search
@@ -383,7 +396,8 @@ public class FinancialStatmentRepository : RepositoryBase<long, FinancialStatmen
};
list.Add(item);
}
list.Reverse();
var res = new FinancialStatmentDetailsByContractingPartyViewModel()
{
@@ -392,7 +406,7 @@ public class FinancialStatmentRepository : RepositoryBase<long, FinancialStatmen
TotalCredit = financialStatement.FinancialTransactionList.Sum(x => x.Creditor),
TotalDebt = financialStatement.FinancialTransactionList.Sum(x => x.Deptor),
ContractingPartyName = financialStatement.ContractingPartyName,
List = list.OrderByDescending(x=>x.DateTimeGr).ToList(),
List = list,
};
return res;
}

View File

@@ -1517,7 +1517,9 @@ public class RollCallRepository : RepositoryBase<long, RollCall>, IRollCallRepos
StartDate = y.StartDate.Value.ToString("HH:mm"),
EndDate = y.EndDate!.Value.ToString("HH:mm"),
StartDateGr = y.StartDate.Value,
EndDateGr = y.EndDate.Value
EndDateGr = y.EndDate.Value,
EntryTimeDifferences = CalculateEntryTimeDifferences( y.EarlyEntryDuration, y.LateEntryDuration),
ExitTimeDifferences = CalculateExitTimeDifferences(y.EarlyExitDuration, y.LateExitDuration)
}),
TotalWorkingHoursSpan = new TimeSpan(rollCallsList.Where(y => x.Date == y.ShiftDate.Date)
.Sum(y => (y.EndDate!.Value - y.StartDate.Value).Ticks)),

View File

@@ -527,6 +527,13 @@ public class institutionContractController : AdminBaseController
var res =await _institutionContractApplication.GetAmendmentWorkshops(institutionContractId);
return res;
}
[HttpPost("resend-verify-link/{institutionContractId}")]
public async Task<OperationResult> ResendVerifyLink(long institutionContractId)
{
var res = await _institutionContractApplication.ResendVerifyLink(institutionContractId);
return res;
}
}

View File

@@ -871,6 +871,14 @@
</div>
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="1004" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> قرارداد های مالی </span> </label>
</div>
</div>
@* بررسی مدارک پرسنل *@
<div class="parent-check">

View File

@@ -881,6 +881,15 @@
</div>
<div class="child-check level2">
<label class="btn btn-icon waves-effect btn-default m-b-5 open-close">
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
</label>
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="1004" class="check-btn"> &nbsp;<span style="bottom: 2px;position: relative"> قرارداد های مالی </span> </label>
</div>
</div>
@* بررسی مدارک پرسنل *@
<div class="parent-check">

View File

@@ -195,7 +195,7 @@
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">عدم حضور</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
@@ -328,7 +328,7 @@
<div class="btnsRollCallOnlline">
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">عدم حضور <span id="absentCount"></span></button>
</div>
</div>
<div class="wrapper">

View File

@@ -127,7 +127,7 @@
</a>
</div>
<div class="gwb-card" permission="1002">
<div class="gwb-card" permission="1004">
<a href="https://admin@(AppSetting.Value.Domain)/workflow/institution-contract" class="click loadingButton">
<div class="d-flex align-items-center justify-content-between p-1 w-100">
<div class="d-flex align-items-center">

View File

@@ -231,7 +231,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -382,7 +382,9 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
IsAbsent = x.IsAbsent,
TotalWorkingHours = x.TotalWorkingHours,
StartsItems = string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.StartDate)),
EndsItems= string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.EndDate))
EndsItems= string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.EndDate)),
EnterTimeDifferences = string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.EntryTimeDifferences)),
ExitTimeDifferences = string.Join(Environment.NewLine, x.RollCallTimesList.Select(tr=>tr.ExitTimeDifferences))
}).ToList()
};

View File

@@ -234,7 +234,7 @@
<div class="rollcall-list Rtable Rtable--5cols Rtable--collapse px-1">
<div class="w-100 my-1">
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">غیبت</div>
<div class="absenceHeadColorTop" style="border-radius: 10px 10px 0 0;">عدم حضور</div>
<div class="Rtable-row Rtable-row--head align-items-center d-flex table-rollcall-absent absenceHeadColor">
<div class="Rtable-cell column-heading width1">ردیف</div>
<div class="Rtable-cell column-heading width2">نام پرسنل</div>
@@ -367,7 +367,7 @@
<div class="btnsRollCallOnlline">
<button class="btnRollCallStatus active" onclick="loadRollCallStatus('all')">آنلاین</button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('leave')">مرخصی <span id="leaveCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">غیبت <span id="absentCount"></span></button>
<button class="btnRollCallStatus" onclick="loadRollCallStatus('absent')">عدم حضور <span id="absentCount"></span></button>
</div>
</div>
<div class="wrapper">

View File

@@ -223,7 +223,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -383,7 +383,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -393,7 +393,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -17,7 +17,7 @@
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
<h6 class="m-0">پرینت حضور و غیاب انفرادی @Model.PersianMonthName ماه @Model.PersianYear</h6>
</div>
```````
<div class="modal-body" id="divTablescrollbar">
<div class="row main-table">
@@ -121,7 +121,17 @@
<span class="m-0">@item.DateFa</span>
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
-
@if (item.RollCallTimesList.Any())
{
@foreach (var rollCallItem in item.RollCallTimesList)
{
<div>@(rollCallItem.EntryTimeDifferences ?? "-")</div>
}
}
else
{
<span>-</span>
}
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
@if (item.RollCallTimesList.Any())
@@ -150,7 +160,17 @@
}
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
-
@if (item.RollCallTimesList.Any())
{
@foreach (var rollCallItem in item.RollCallTimesList)
{
<div>@(rollCallItem.ExitTimeDifferences ?? "-")</div>
}
}
else
{
<span>-</span>
}
</td>
<td style="font-family: 'IranText' !important; font-size: 10px !important; text-align: center">
@item.TotalWorkingHours

View File

@@ -90,7 +90,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -154,7 +154,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -218,7 +218,7 @@
<div class="day-off-parent mb-4">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -168,7 +168,7 @@
<div class="day-off-parent">
<div class="day-off-title mb-2">
روزهای تعطیل هفته
روزهای فعالیت مجموعه
</div>
<div class="day-off-button-container mb-3">

View File

@@ -71,7 +71,7 @@
<li class="active" data-menu="absent">
<div class="d-flex align-items-center justify-content-between" id="clickAbsentTab">
<a href="javascript:void(0);">غیبت</a>
<a href="javascript:void(0);">عدم حضور</a>
<div>
<div id="CountAbsentLoading" class="spinner-grow text-danger" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
<span class="visually-hidden">Loading...</span>
@@ -218,7 +218,7 @@
<div class="Rtable-row SubAccountRowMobile align-items-center position-relative openAction">
<div class="Rtable-cell d-md-block d-flex width2">
<div class="Rtable-cell--content text-start">
<div class="roleName">غیبت</div>
<div class="roleName">عدم حضور</div>
</div>
</div>
<div>

View File

@@ -420,7 +420,7 @@ input:checked + .sliderEUP:before {
background-color: #ffffff;
background: rgba(209, 50, 50, 0.15);
transition: ease .2s;
width: 55px;
/*width: 55px;*/
}
.btn-workflow-rollcall-edit {

View File

@@ -292,7 +292,7 @@ function loadEmployeeListByWorkFlowsAbsents(date) {
</button>
<button type="button" class="btn-workflow-absent" onclick="confirmAbsentAlert(${rollCallItem.employeeId}, '${data.dateTimeFa}')">
<span class="mx-1">غیبت</span>
<span class="mx-1 text-nowrap">عدم حضور</span>
</button>
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalEditRollCall(${rollCallItem.employeeId}, '${data.dateTimeFa}')">
@@ -1028,7 +1028,7 @@ function showModalEditLeave(leaveId) {
function confirmAbsentAlert(employeeId, dateFa) {
swal({
title: "آیا از تایید این غیبت اطمینان دارید؟",
title: "آیا از تایید این عدم حضور اطمینان دارید؟",
text: "",
type: "warning",
showCancelButton: true,