diff --git a/AccountManagement.Application/AccountApplication.cs b/AccountManagement.Application/AccountApplication.cs index f8bc94ee..39202547 100644 --- a/AccountManagement.Application/AccountApplication.cs +++ b/AccountManagement.Application/AccountApplication.cs @@ -348,16 +348,12 @@ public class AccountApplication : IAccountApplication _accountRepository.SaveChanges(); _smsService.LoginSend(phone, r); - TimeSpan delay = TimeSpan.FromSeconds(130); - await Task.Delay(delay); - - account.SetVerifyCode(""); - _accountRepository.SaveChanges(); + //TimeSpan delay = TimeSpan.FromSeconds(30); + + await _accountRepository.RemoveCode(id); + return operation.Succcedded(); - - - } diff --git a/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs b/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs index 6c448baa..e97742fe 100644 --- a/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs +++ b/AccountMangement.Infrastructure.EFCore/Repository/AccountRepository.cs @@ -172,7 +172,7 @@ public class AccountRepository : RepositoryBase, IAccountReposito public async Task RemoveCode(long id) { - TimeSpan delay = TimeSpan.FromSeconds(10); + TimeSpan delay = TimeSpan.FromSeconds(30); await Task.Delay(delay); var acc = Get(id); acc.VerifyCode = ""; diff --git a/Company.Domain/PersonnelCodeAgg/IPersonnelCodeRepository.cs b/Company.Domain/PersonnelCodeAgg/IPersonnelCodeRepository.cs index be5b42fe..2123c95b 100644 --- a/Company.Domain/PersonnelCodeAgg/IPersonnelCodeRepository.cs +++ b/Company.Domain/PersonnelCodeAgg/IPersonnelCodeRepository.cs @@ -17,4 +17,5 @@ public interface IPersonnelCodeRepository : IRepository Search(PersonnelCodeSearchModel searchModel); PersonnelCodeViewModel GetPersonnelCodeViewModel(PersonnelCodeSearchModel searchModel); + long GetEmployeeIdByPersonelCode(long personleCode, long workshopId); } \ No newline at end of file diff --git a/CompanyManagment.Application/PersonnelCodeApplication.cs b/CompanyManagment.Application/PersonnelCodeApplication.cs index d24ebaf5..da131b8e 100644 --- a/CompanyManagment.Application/PersonnelCodeApplication.cs +++ b/CompanyManagment.Application/PersonnelCodeApplication.cs @@ -71,4 +71,9 @@ public class PersonnelCodeApplication : IPersonnelCodeApplication { return _personnelCodeRepository.GetPersonnelCodeViewModel(searchModel); } + + public long GetEmployeeIdByPersonelCode(long personleCode, long workshopId) + { + return _personnelCodeRepository.GetEmployeeIdByPersonelCode(personleCode, workshopId); + } } \ No newline at end of file diff --git a/CompanyManagment.EFCore/Repository/PersonnelCodeRepository.cs b/CompanyManagment.EFCore/Repository/PersonnelCodeRepository.cs index e0f07848..30465658 100644 --- a/CompanyManagment.EFCore/Repository/PersonnelCodeRepository.cs +++ b/CompanyManagment.EFCore/Repository/PersonnelCodeRepository.cs @@ -49,7 +49,7 @@ public class PersonnelCodeRepository : RepositoryBase { query = query.Where(x => x.WorkshopId == searchModel.WorkshopId); } - + return query.OrderByDescending(x => x.Id).ToList(); } public PersonnelCodeViewModel GetPersonnelCodeViewModel(PersonnelCodeSearchModel searchModel) @@ -82,4 +82,12 @@ public class PersonnelCodeRepository : RepositoryBase { return _context.PersonnelCodeSet.FirstOrDefault(x => x.WorkshopId == workshopId && x.EmployeeId == employeeId)!.PersonnelCode; } + + public long GetEmployeeIdByPersonelCode(long personleCode, long workshopId) + { + var res =_context.PersonnelCodeSet.FirstOrDefault(x => x.PersonnelCode == personleCode && x.WorkshopId == workshopId); + if(res != null) + return res.EmployeeId; + return 0; + } } \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml b/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml index 75fac18a..8f97b4bf 100644 --- a/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Accounts/Account/AccountLeftWork.cshtml @@ -1,430 +1,430 @@ @model AccountManagement.Application.Contracts.Account.AccountLeftWorkViewModel @Html.AntiForgeryToken() @{ - - + + .checkbox-wrapper-26 .tick_mark:after { + left: 0; + bottom: 0; + width: 100%; + height: calc(var(--size) * .1); + box-shadow: 0 3px 5px rgba(0, 0, 0, 0.23); + transform: translateX(calc(var(--size) * .78)); + } + + .checkbox-wrapper-26 input[type="checkbox"]:checked + label { + background-color: #07d410; + box-shadow: 0 var(--shadow) #92ff97; + } + + .checkbox-wrapper-26 input[type="checkbox"]:checked + label:before { + width: 0; + height: 0; + } + + .checkbox-wrapper-26 input[type="checkbox"]:checked + label .tick_mark:before, + .checkbox-wrapper-26 input[type="checkbox"]:checked + label .tick_mark:after { + transform: translate(0); + opacity: 1; + } + + }