CreateWorkshopAccount and report Fixed lost codes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
@@ -11,4 +12,7 @@ public class AccountLeftWorkViewModel
|
||||
public string LeftDateFa { get; set; }
|
||||
public List<AccountViewModel> AccountList { get; set; }
|
||||
public List<WorkshopAccountlistViewModel> WorkshopAccountlist { get; set; }
|
||||
public SelectList WorkshopSelectList { get; set; }
|
||||
|
||||
public SelectList AccountSelectList { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,13 @@
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class AccountSearchModel
|
||||
{
|
||||
public class AccountSearchModel
|
||||
{
|
||||
public string Fullname { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public long RoleId { get; set; }
|
||||
public string RoleName { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string IsActiveString { get; set; }
|
||||
public string positionId { get; set; }
|
||||
}
|
||||
}
|
||||
public string Fullname { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public long RoleId { get; set; }
|
||||
public string RoleName { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string IsActiveString { get; set; }
|
||||
public string positionId { get; set; }
|
||||
}
|
||||
@@ -1,27 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class AccountViewModel
|
||||
{
|
||||
public class AccountViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Fullname { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public long RoleId { get; set; }
|
||||
public string Role { get; set; }
|
||||
public string ProfilePhoto { get; set; }
|
||||
public string CreationDate { get; set; }
|
||||
public string RoleName { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string IsActiveString { get; set; }
|
||||
public DateTime CreationDateGr { get; set; }
|
||||
public long Id { get; set; }
|
||||
public string Fullname { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Mobile { get; set; }
|
||||
public long RoleId { get; set; }
|
||||
public string Role { get; set; }
|
||||
public string ProfilePhoto { get; set; }
|
||||
public string CreationDate { get; set; }
|
||||
public string RoleName { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string IsActiveString { get; set; }
|
||||
public DateTime CreationDateGr { get; set; }
|
||||
|
||||
#region Mahan
|
||||
#region Mahan
|
||||
|
||||
public int PositionValue { get; set; }
|
||||
public long PositionId { get; set; }
|
||||
#endregion
|
||||
public string AdminAreaPermission { get; set; }
|
||||
}
|
||||
}
|
||||
public int PositionValue { get; set; }
|
||||
public long PositionId { get; set; }
|
||||
#endregion
|
||||
public string AdminAreaPermission { get; set; }
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class ChangePassword
|
||||
{
|
||||
public class ChangePassword
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string RePassword { get; set; }
|
||||
}
|
||||
}
|
||||
public long Id { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string RePassword { get; set; }
|
||||
}
|
||||
@@ -5,35 +5,34 @@ using System.ComponentModel.DataAnnotations;
|
||||
using AccountManagement.Application.Contracts.Role;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class CreateAccount
|
||||
{
|
||||
public class CreateAccount
|
||||
{
|
||||
[Required(ErrorMessage = ValidationMessages.IsRequired)]
|
||||
public string Fullname { get; set; }
|
||||
[Required(ErrorMessage = ValidationMessages.IsRequired)]
|
||||
public string Fullname { get; set; }
|
||||
|
||||
[Required(ErrorMessage = ValidationMessages.IsRequired)]
|
||||
public string Username { get; set; }
|
||||
[Required(ErrorMessage = ValidationMessages.IsRequired)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Required(ErrorMessage = ValidationMessages.IsRequired)]
|
||||
public string Password { get; set; }
|
||||
[Required(ErrorMessage = ValidationMessages.IsRequired)]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
|
||||
[Required(ErrorMessage = "این مقدار نمی تواند خالی باشد")]
|
||||
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||
public string Mobile { get; set; }
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
public long RoleId { get; set; }
|
||||
public long RoleId { get; set; }
|
||||
|
||||
public IFormFile ProfilePhoto { get; set; }
|
||||
public string ProfilePhotoStr { get; set; }
|
||||
public List<RoleViewModel> Roles { get; set; }
|
||||
public IFormFile ProfilePhoto { get; set; }
|
||||
public string ProfilePhotoStr { get; set; }
|
||||
public List<RoleViewModel> Roles { get; set; }
|
||||
|
||||
public string AdminAreaPermission { get; set; }
|
||||
public string ClientAriaPermission { get; set; }
|
||||
public string NationalCode { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string IsActiveString { get; set; }
|
||||
}
|
||||
}
|
||||
public string AdminAreaPermission { get; set; }
|
||||
public string ClientAriaPermission { get; set; }
|
||||
public string NationalCode { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string VerifyCode { get; set; }
|
||||
public string IsActiveString { get; set; }
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class EditAccount : CreateAccount
|
||||
{
|
||||
public class EditAccount : CreateAccount
|
||||
{
|
||||
public long Id { get; set; }
|
||||
}
|
||||
}
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -4,10 +4,9 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class EditClientAccount : RegisterAccount
|
||||
{
|
||||
public class EditClientAccount : RegisterAccount
|
||||
{
|
||||
public long Id { get; set; }
|
||||
}
|
||||
}
|
||||
public long Id { get; set; }
|
||||
}
|
||||
@@ -3,40 +3,45 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public interface IAccountApplication
|
||||
{
|
||||
public interface IAccountApplication
|
||||
{
|
||||
AccountViewModel GetAccountBy(long id);
|
||||
OperationResult Create(CreateAccount command);
|
||||
OperationResult RegisterClient(RegisterAccount command);
|
||||
OperationResult Edit(EditAccount command);
|
||||
OperationResult EditClient(EditClientAccount command);
|
||||
OperationResult ChangePassword(ChangePassword command);
|
||||
OperationResult Login(Login command);
|
||||
OperationResult LoginWithMobile(long id);
|
||||
EditAccount GetDetails(long id);
|
||||
List<AccountViewModel> Search(AccountSearchModel searchModel);
|
||||
void Logout();
|
||||
List<AccountViewModel> GetAccounts();
|
||||
List<AccountViewModel> GetClientsAccount();
|
||||
Task<OperationResult> SetVerifyCode(string phone, long id);
|
||||
Task<OperationResult> SendVerifyCodeToChangingPass(string phone, long id);
|
||||
EditAccount GetByVerifyCode(string code, string phone);
|
||||
EditAccount GetByUserNameAndId(long id, string username);
|
||||
OperationResult Active(long id);
|
||||
OperationResult DeActive(long id);
|
||||
OperationResult DirectLogin(long id);
|
||||
AccountViewModel GetAccountBy(long id);
|
||||
OperationResult Create(CreateAccount command);
|
||||
OperationResult RegisterClient(RegisterAccount command);
|
||||
OperationResult Edit(EditAccount command);
|
||||
OperationResult EditClient(EditClientAccount command);
|
||||
OperationResult ChangePassword(ChangePassword command);
|
||||
OperationResult Login(Login command);
|
||||
OperationResult LoginWithMobile(long id);
|
||||
EditAccount GetDetails(long id);
|
||||
List<AccountViewModel> Search(AccountSearchModel searchModel);
|
||||
void Logout();
|
||||
List<AccountViewModel> GetAccounts();
|
||||
List<AccountViewModel> GetClientsAccount();
|
||||
Task<OperationResult> SetVerifyCode(string phone, long id);
|
||||
Task<OperationResult> SendVerifyCodeToChangingPass(string phone, long id);
|
||||
EditAccount GetByVerifyCode(string code, string phone);
|
||||
EditAccount GetByUserNameAndId(long id, string username);
|
||||
OperationResult Active(long id);
|
||||
OperationResult DeActive(long id);
|
||||
OperationResult DirectLogin(long id);
|
||||
|
||||
AccountLeftWorkViewModel WorkshopList(long accountId);
|
||||
AccountLeftWorkViewModel WorkshopList(long accountId);
|
||||
OperationResult SaveWorkshopAccount(
|
||||
List<WorkshopAccountlistViewModel> workshopAccountList,
|
||||
string startDate,
|
||||
string leftDate,
|
||||
long accountId);
|
||||
|
||||
#region Mahan
|
||||
List<AccountViewModel> AccountsForAssign(long accountId);
|
||||
List<AccountViewModel> GetAccountsByPositionId(long positionId);
|
||||
OperationResult CreateNewWorkshopAccount(long currentAccountId, long newAccountId);
|
||||
#region Mahan
|
||||
List<AccountViewModel> AccountsForAssign(long accountId);
|
||||
List<AccountViewModel> GetAccountsByPositionId(long positionId);
|
||||
|
||||
List<AccountViewModel> GetAccountLowerPositionvalue();
|
||||
OperationResult ReLogin();
|
||||
List<AccountViewModel> GetAccountLowerPositionvalue();
|
||||
OperationResult ReLogin();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class Login
|
||||
{
|
||||
public class Login
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
@@ -7,31 +7,30 @@ using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class RegisterAccount
|
||||
{
|
||||
public class RegisterAccount
|
||||
{
|
||||
[Required(ErrorMessage = "نام و نام خانوادگی نمی تواند خالی باشد")]
|
||||
public string Fullname { get; set; }
|
||||
[Required(ErrorMessage = "نام و نام خانوادگی نمی تواند خالی باشد")]
|
||||
public string Fullname { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "نام کاربری نمی تواند خالی باشد")]
|
||||
public string Username { get; set; }
|
||||
[Required(ErrorMessage = "نام کاربری نمی تواند خالی باشد")]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "گذرواژه نمیتواند خالی باشد")]
|
||||
public string Password { get; set; }
|
||||
[Required(ErrorMessage = "گذرواژه نمیتواند خالی باشد")]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "شماره موبایل نمی تواند خالی باشد")]
|
||||
[Required(ErrorMessage = "شماره موبایل نمی تواند خالی باشد")]
|
||||
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "شماره موبایل معتبر وارد کنید")]
|
||||
public string Mobile { get; set; }
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "شماره موبایل معتبر وارد کنید")]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "کد ملی نمی تواند خالی باشد")]
|
||||
public string NationalCode { get; set; }
|
||||
[Required(ErrorMessage = "کد ملی نمی تواند خالی باشد")]
|
||||
public string NationalCode { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
public string Email { get; set; }
|
||||
|
||||
public IFormFile ProfilePhoto { get; set; }
|
||||
public IFormFile ProfilePhoto { get; set; }
|
||||
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
}
|
||||
public long ContractingPartyId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Account;
|
||||
|
||||
public class WorkshopSelectList
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public string WorkshopFullName { get; set; }
|
||||
}
|
||||
@@ -4,6 +4,10 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.ViewFeatures" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\0_Framework\0_Framework.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user