...
This commit is contained in:
@@ -3,10 +3,12 @@ using Back.Data.Models;
|
||||
using Back.Services;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
using Org.BouncyCastle.Asn1.Cmp;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using Shared.DTOs;
|
||||
using Shared.DTOs.Serch;
|
||||
using System;
|
||||
@@ -468,7 +470,90 @@ namespace Back.Controllers
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||
return Ok(_servTaxPayer.GetSentTax(user.RolUsers.First().CompanyID,item));
|
||||
return Ok(await _servTaxPayer.GetSentTax(user.RolUsers.First().CompanyID, item));
|
||||
}
|
||||
[HttpGet("GetResult/{ID}")]
|
||||
public async Task<ActionResult<DataInSendTaxDto>> GetResultByUid(int ID)
|
||||
{
|
||||
try
|
||||
{
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
var user = await _servUser.GetUserByUserID(Convert.ToInt32(UserID));
|
||||
var item = await _servTaxPayer.GetSentTax(user.RolUsers.First().CompanyID, ID);
|
||||
if (item == null)
|
||||
return BadRequest(new List<string> { "یافت نشد" });
|
||||
|
||||
if (string.IsNullOrEmpty(item.uId))
|
||||
return BadRequest(new List<string> { "کد پیگیری یافت نشد" });
|
||||
|
||||
if (!await _actionTaxPayer.login(user.RolUsers.First().CompanyID))
|
||||
return BadRequest(new List<string> { "خطا در احراز هویت سازمان مالیاتی" });
|
||||
|
||||
DataInSendTaxDto desData = new DataInSendTaxDto();
|
||||
if (item.SentStatus==SentStatus.Send
|
||||
|| item.SentStatus == SentStatus.pending
|
||||
|| item.SentStatus == SentStatus.IN_PROGRESS)
|
||||
{
|
||||
|
||||
|
||||
var result = await _actionTaxPayer.GetResultByUid(user.RolUsers.First().CompanyID, item.uId);
|
||||
if (result == null)
|
||||
return BadRequest(new List<string> { "پاسخی از سازمان دریافت نشد" });
|
||||
|
||||
else
|
||||
{
|
||||
item.InquiryResultModel = JsonConvert.SerializeObject(result);
|
||||
if (result.Data != null)
|
||||
{
|
||||
desData = JsonConvert.DeserializeObject<DataInSendTaxDto>(result.Data.ToString());
|
||||
if (desData == null)
|
||||
{
|
||||
desData = new DataInSendTaxDto();
|
||||
desData.error = JsonConvert.DeserializeObject<List<MessageInSendTaxDto>>(result.Data.ToString());
|
||||
}
|
||||
}
|
||||
desData.SentStatus = item.SentStatus =
|
||||
result.Status == "FAILED" ? SentStatus.Unsuccessful
|
||||
: result.Status == "PENDING" ? SentStatus.pending
|
||||
: result.Status == "SUCCESS" ? SentStatus.Successful
|
||||
: result.Status == "NOT_FOUND" ? SentStatus.NOT_FOUND
|
||||
: result.Status == "IN_PROGRESS" ? SentStatus.IN_PROGRESS
|
||||
: SentStatus.Unknown;
|
||||
}
|
||||
if (await _servTaxPayer.UpdateSentTax(item)) return Ok(desData);
|
||||
|
||||
else return BadRequest(new List<string> { "خطای در ذخیره سازی" });
|
||||
}
|
||||
else if (item.SentStatus == SentStatus.Unsuccessful && !string.IsNullOrEmpty(item.InquiryResultModel))
|
||||
{
|
||||
InquiryResultModel inquiryResult = JsonConvert.DeserializeObject<InquiryResultModel>(item.InquiryResultModel);
|
||||
if (inquiryResult.Data != null)
|
||||
{
|
||||
desData.SentStatus = item.SentStatus =
|
||||
inquiryResult.Status == "FAILED" ? SentStatus.Unsuccessful
|
||||
: inquiryResult.Status == "PENDING" ? SentStatus.pending
|
||||
: inquiryResult.Status == "SUCCESS" ? SentStatus.Successful
|
||||
: inquiryResult.Status == "NOT_FOUND" ? SentStatus.NOT_FOUND
|
||||
: inquiryResult.Status == "IN_PROGRESS" ? SentStatus.IN_PROGRESS
|
||||
: SentStatus.Unknown;
|
||||
|
||||
desData = JsonConvert.DeserializeObject<DataInSendTaxDto>(inquiryResult.Data.ToString());
|
||||
if (desData == null)
|
||||
{
|
||||
desData = new DataInSendTaxDto();
|
||||
desData.error = JsonConvert.DeserializeObject<List<MessageInSendTaxDto>>(inquiryResult.Data.ToString());
|
||||
}
|
||||
}
|
||||
return Ok(desData);
|
||||
}
|
||||
|
||||
return BadRequest(new List<string> { "در این وضعیت امکان پذیر نمی باشد" });
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return BadRequest(new List<string> { "خطای ناشناخته" });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -82,7 +82,16 @@ namespace Back.Controllers
|
||||
// return Ok(await _servUser.ChangeUserName(newUsername, Convert.ToInt32(UserID)));
|
||||
}
|
||||
|
||||
[HttpGet("GetDashBoard")]
|
||||
public async Task<ActionResult<DashBoardDTO>> GetDashBoard()
|
||||
{
|
||||
var claim = HttpContext.User.Claims.First(c => c.Type == "UserID");
|
||||
var UserID = claim.Value;
|
||||
|
||||
|
||||
return Ok(await _servUser.GetDashBoard(Convert.ToInt32(UserID)));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,8 @@ namespace Back.Data.Models
|
||||
public string InvoiceModel { get; set; }
|
||||
[Column(TypeName = "nvarchar(MAX)")]
|
||||
public string? ResponseModel { get; set; }
|
||||
[Column(TypeName = "nvarchar(MAX)")]
|
||||
public string? InquiryResultModel { get; set; }
|
||||
public SentStatus SentStatus { get; set; }
|
||||
|
||||
#region Navigation
|
||||
|
@@ -3,7 +3,6 @@ using Back.Data.Contracts;
|
||||
using Back.Data.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Back.Common;
|
||||
using Shared;
|
||||
using Microsoft.OpenApi.Extensions;
|
||||
using Shared.DTOs.Serch;
|
||||
|
||||
@@ -77,6 +76,14 @@ namespace Back.Services
|
||||
.ThenInclude(inc => inc.CODUnit)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
public async Task<SentTax> GetSentTax(int CompanyID, int ID)
|
||||
{
|
||||
return await _repoSentTax.Get(w=>w.ID== ID && w.invoice.CompanyID==CompanyID).FirstOrDefaultAsync();
|
||||
}
|
||||
public async Task<bool> UpdateSentTax(SentTax sent)
|
||||
{
|
||||
return await _repoSentTax.UpdateAsync(sent);
|
||||
}
|
||||
public async Task<bool> AddSentTax(SentTax sentTax)
|
||||
{
|
||||
return await _repoSentTax.AddBoolResultAsync(sentTax);
|
||||
@@ -221,13 +228,13 @@ namespace Back.Services
|
||||
return await request.OrderByDescending(o=>o.ID)
|
||||
.Select(s => new SentTaxDto
|
||||
{
|
||||
Date = s.Date.ShamciToFormatShamciinFront(),
|
||||
Date = s.Date.ShamciToFormatShamci(),
|
||||
Time = s.Time,
|
||||
ID = s.ID,
|
||||
InvoiceID = s.InvoiceID,
|
||||
SentStatus=s.SentStatus,
|
||||
msgInvoiceType = s.InvoiceType.GetDisplayName(),
|
||||
msgSentStatus = s.SentStatus.GetDisplayName()
|
||||
msgInvoiceType = s.InvoiceType.GetEnumDisplayName(),
|
||||
msgSentStatus = s.SentStatus.GetEnumDisplayName()
|
||||
|
||||
}).Paging(itemSerchGetSentTax.PageIndex, itemSerchGetSentTax.PageSize);
|
||||
}
|
||||
|
@@ -188,11 +188,15 @@ namespace Back.Services
|
||||
user.Password = newpassword.encrypted();
|
||||
return await _RepoUser.UpdateAsync(user);
|
||||
}
|
||||
public async Task<DashBoardDTO> GetDashBoard(int CompanyID, int UserID)
|
||||
public async Task<DashBoardDTO> GetDashBoard(int UserID)
|
||||
{
|
||||
var user = await GetUserByUserID(UserID);
|
||||
DashBoardDTO request = new DashBoardDTO();
|
||||
var period = await _RepoPermissionPeriod
|
||||
.Get(w => w.CompanyID == CompanyID && (!w.IsLocked.HasValue || !w.IsLocked.Value)).ToListAsync();
|
||||
.Get(w => w.CompanyID == user.RolUsers.First().CompanyID && (!w.IsLocked.HasValue || !w.IsLocked.Value))
|
||||
.Include(inc=>inc.CalculationType)
|
||||
.Include(inc => inc.Permission)
|
||||
.ToListAsync();
|
||||
foreach (var item in period)
|
||||
{
|
||||
request.AlistofServices.Add(new ServiceInDashBoardDTO
|
||||
@@ -210,16 +214,16 @@ namespace Back.Services
|
||||
if (!string.IsNullOrEmpty(request.LastLoginDate))
|
||||
request.LastLoginDate.ShamciToFormatShamci();
|
||||
|
||||
var user = await GetUserByUserID(UserID);
|
||||
if (user.Mobile == user.Username)
|
||||
request.Warning.Add(new AlertDTO { Status = 0, Message = "موبایل و نام کاربری بهتر است شبیه هم نباشند" });
|
||||
|
||||
//if (user.Mobile == user.Username)
|
||||
// request.Warning.Add(new AlertDTO { Status = 0, Message = "موبایل و نام کاربری بهتر است شبیه هم نباشند" });
|
||||
if (user.Mobile.encrypted() == user.Password)
|
||||
request.Warning.Add(new AlertDTO { Status = 0, Message = "موبایل و کلمه عبور بهتر است شبیه هم نباشند" });
|
||||
var Company = user.RolUsers.Where(w => w.CompanyID == CompanyID).Select(s => s.Company).FirstOrDefault();
|
||||
var Company = user.RolUsers.Where(w => w.CompanyID == user.RolUsers.First().CompanyID).Select(s => s.Company).FirstOrDefault();
|
||||
if (Company != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(Company.Email) || string.IsNullOrEmpty(Company.Phone)
|
||||
|| string.IsNullOrEmpty(Company.EconomicCode) || string.IsNullOrEmpty(Company.UniqeMemory)
|
||||
if (/*string.IsNullOrEmpty(Company.Email) || string.IsNullOrEmpty(Company.Phone) || */
|
||||
string.IsNullOrEmpty(Company.EconomicCode) || string.IsNullOrEmpty(Company.UniqeMemory)
|
||||
|| string.IsNullOrEmpty(Company.PrivateKey))
|
||||
{
|
||||
request.Warning.Add(new AlertDTO { Status = 0, Message = "بهتر است اطلاعات شرکت بروزرسانی شود" });
|
||||
|
@@ -11,6 +11,7 @@ namespace Shared.DTOs
|
||||
}
|
||||
public class DashBoardDTO
|
||||
{
|
||||
public string Datenow { get { return DateTime.Now.ConvertMiladiToShamsiinFront(); } }
|
||||
public string? LastLoginDate { get; set; }
|
||||
public List<ServiceInDashBoardDTO> AlistofServices { get; set; }=new List<ServiceInDashBoardDTO>();
|
||||
public List<AlertDTO> Warning { get; set; } = new List<AlertDTO>();
|
||||
|
36
Shared/DTOs/DataInSendTaxDto.cs
Normal file
36
Shared/DTOs/DataInSendTaxDto.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shared.DTOs
|
||||
{
|
||||
public class InquiryResultModelDto
|
||||
{
|
||||
public string ReferenceNumber { get; set; }
|
||||
|
||||
public string Uid { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public string Data { get; set; }
|
||||
|
||||
public string PacketType { get; set; }
|
||||
|
||||
public string FiscalId { get; set; }
|
||||
}
|
||||
public class MessageInSendTaxDto
|
||||
{
|
||||
public string code { get; set; }
|
||||
public string message { get; set; }
|
||||
// public string errorType { get; set; }
|
||||
}
|
||||
public class DataInSendTaxDto
|
||||
{
|
||||
// public int? confirmationReferenceId { get; set; }
|
||||
public List<MessageInSendTaxDto> error { get; set; }
|
||||
// public List<MessageInSendTaxDto> warning { get; set; }
|
||||
public SentStatus SentStatus { get; set; }
|
||||
public string msgSentStatus { get { return SentStatus.GetEnumDisplayName(); } } }
|
||||
}
|
13
Shared/DTOs/GetResultSentTaxDto.cs
Normal file
13
Shared/DTOs/GetResultSentTaxDto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Shared.DTOs
|
||||
{
|
||||
public class GetResultSentTaxDto
|
||||
{
|
||||
public SentStatus status { get; set; }
|
||||
}
|
||||
}
|
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -9,12 +10,18 @@ namespace Shared.DTOs
|
||||
{
|
||||
public class SentTaxDto
|
||||
{
|
||||
[Display(Name ="شناسه")]
|
||||
public int ID { get; set; }
|
||||
[Display(Name = "شناسه صورتحساب")]
|
||||
public int InvoiceID { get; set; }
|
||||
[Display(Name = "تاریخ")]
|
||||
public string Date { get; set; }
|
||||
[Display(Name = "زمان")]
|
||||
public string Time { get; set; }
|
||||
public SentStatus SentStatus { get; set; }
|
||||
[Display(Name = "وضعیت صورتحساب")]
|
||||
public string msgInvoiceType { get; set; }
|
||||
[Display(Name = "وضعیت ارسال")]
|
||||
public string msgSentStatus { get; set; }
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,9 @@ namespace Shared.DTOs
|
||||
[Display(Name = "نامشخص")]
|
||||
Unknown,
|
||||
[Display(Name = "یافت نشده")]
|
||||
NOT_FOUND
|
||||
NOT_FOUND,
|
||||
[Display(Name = "در حال انجام")]
|
||||
IN_PROGRESS
|
||||
|
||||
}
|
||||
}
|
||||
|
43
TaxPayerFull/CUSComponent/SendTaxItem.razor
Normal file
43
TaxPayerFull/CUSComponent/SendTaxItem.razor
Normal file
@@ -0,0 +1,43 @@
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@inject HttpClientController hc;
|
||||
<form>
|
||||
|
||||
<div class="row g-3">
|
||||
<label class="col-sm-5 col-form-label">وضعیت ارسال</label>
|
||||
<InputText @Value="inData.msgSentStatus" type="text" class="form-control" id="msgSentStatus" placeholder="وضعیت ارسال" />
|
||||
</div>
|
||||
@if (inData.SentStatus == SentStatus.Unsuccessful)
|
||||
{
|
||||
<div class="row g-3">
|
||||
<table class="table">
|
||||
<caption>لیست خطاهای صورتحساب</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">کد</th>
|
||||
<th scope="col">متن</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in inData.error)
|
||||
{
|
||||
<tr>
|
||||
<td>@item.code</td>
|
||||
<td>@item.message</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter] public DataInSendTaxDto inData { get; set; }
|
||||
}
|
@@ -50,7 +50,7 @@
|
||||
@decimal.Parse(property.GetValue(item, null).ToString()).ToString("N0") ريال
|
||||
</td>
|
||||
}
|
||||
else if (property.Name.ToLower() == "id")
|
||||
else if (property.Name.ToLower() == "id" && item.ToString() != "Shared.DTOs.SentTaxDto")
|
||||
{
|
||||
if (id > 0)
|
||||
{
|
||||
@@ -62,6 +62,44 @@
|
||||
}
|
||||
|
||||
}
|
||||
else if (property.Name.ToLower() == "msgsentstatus" && item.ToString() == "Shared.DTOs.SentTaxDto")
|
||||
{
|
||||
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
|
||||
switch (convertmodel.SentStatus)
|
||||
{
|
||||
case SentStatus.Send:
|
||||
<td style="background-color:#6495ED">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.Successful:
|
||||
<td style="background-color:#2AD51B">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.Unsuccessful:
|
||||
<td style="background-color:#C70000">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.pending :
|
||||
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.IN_PROGRESS :
|
||||
<td style="background-color:#FCFF2A">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.NOT_FOUND:
|
||||
<td style="background-color:#F19109">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
case SentStatus.Unknown:
|
||||
<td style="background-color:#932D2D">@property.GetValue(item, null)</td>
|
||||
break;
|
||||
|
||||
default:
|
||||
<td>@property.GetValue(item, null)</td>
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>@property.GetValue(item, null)</td>
|
||||
@@ -70,6 +108,26 @@
|
||||
}
|
||||
|
||||
}
|
||||
if (item.ToString() == "Shared.DTOs.SentTaxDto")
|
||||
{
|
||||
var convertmodel = (SentTaxDto)Convert.ChangeType(item, typeof(SentTaxDto));
|
||||
if (convertmodel.SentStatus == SentStatus.Send
|
||||
|| convertmodel.SentStatus == SentStatus.pending
|
||||
|| convertmodel.SentStatus == SentStatus.IN_PROGRESS)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">تعیین وضعیت</button></td>
|
||||
}
|
||||
else if (convertmodel.SentStatus == SentStatus.Unsuccessful)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">نمایش خطا</button></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td><button type="button" class="btn btn-link disabled">...</button></td>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (id > 0)
|
||||
{
|
||||
<td><button @onclick="()=>OnMultipleOfThree.InvokeAsync(Convert.ToInt32(id))" type="button" class="btn btn-link">ویرایش</button></td>
|
||||
@@ -78,6 +136,8 @@
|
||||
{
|
||||
<td><button type="button" class="btn btn-link disabled">ویرایش</button></td>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</tr>
|
||||
|
@@ -1,8 +1,10 @@
|
||||
@page "/Panel"
|
||||
@using Front.Services
|
||||
@using Shared.DTOs
|
||||
@inject localService localserv;
|
||||
@inject NavigationManager nav
|
||||
@layout PanelLayout
|
||||
@inject HttpClientController hc;
|
||||
<PageTitle>کاربری</PageTitle>
|
||||
|
||||
<div class="row">
|
||||
@@ -11,9 +13,9 @@
|
||||
<div class="d-flex align-items-end row">
|
||||
<div class="col-sm-7">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title text-primary">تبریک! 🎉</h5>
|
||||
<p class="mb-4">شما انجام داده اید <span class="fw-bold">72%</span> فروش بیشتر امروز نشان جدید خود را در نمایه خود بررسی کنید.</p>
|
||||
<a href="javascript:;" class="btn btn-sm btn-outline-primary">مشاهده مدالها</a>
|
||||
<h5 class="card-title text-primary">خوش آمدید! 🎉</h5>
|
||||
<p class="mb-4">یک دید کلی از سیستم برای شما تهیه شده<br /> بهتر است روزانه نگاهی به آن داشته باشید</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 text-center text-sm-left">
|
||||
@@ -26,6 +28,9 @@
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4 order-1">
|
||||
<div class="row">
|
||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 3))
|
||||
{
|
||||
|
||||
<div class="col-lg-6 col-md-12 col-6 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
@@ -38,40 +43,129 @@
|
||||
<i class="bx bx-dots-vertical-rounded"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end customStyle new-style-15" aria-labelledby="cardOpt3">
|
||||
<a class="dropdown-item" href="javascript:void(0);">نمایش بیشتر</a>
|
||||
<a class="dropdown-item" href="javascript:void(0);">حذف</a>
|
||||
<a class="dropdown-item" >تمدید</a>
|
||||
<NavLink class="dropdown-item" href="Invoice">صورتحساب ها</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="fw-semibold d-block">پروفایل</span>
|
||||
<h3 class="card-title mb-1">12,628<span style="font-size: 14px">تومان</span></h3>
|
||||
<small class="text-success fw-semibold"><i class='bx bx-up-arrow-alt'></i> +72.80%</small>
|
||||
<span class="fw-semibold d-block">صورتحساب <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 3 && w.CalTypeID == 1))
|
||||
{
|
||||
@if (!dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First().Equals("-"))
|
||||
{
|
||||
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
|
||||
}
|
||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 3 && w.CalTypeID == 2))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
نامحدود
|
||||
</small>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (Convert.ToInt32(dashBoard.Datenow) <= Convert.ToInt32(@dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First().Replace("/","")))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 3 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 4))
|
||||
{
|
||||
<div class="col-lg-6 col-md-12 col-6 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title d-flex align-items-start justify-content-between">
|
||||
<div class="avatar flex-shrink-0">
|
||||
<img src="assets/img/icons/unicons/wallet-info.png" alt="Credit Card" class="rounded">
|
||||
<img src="assets/img/icons/unicons/wallet-info.png" alt="chart success" class="rounded">
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="btn p-0" type="button" id="cardOpt6" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<button class="btn p-0" type="button" id="cardOpt3" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="bx bx-dots-vertical-rounded"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end new-style-14" aria-labelledby="cardOpt6">
|
||||
<a class="dropdown-item" href="javascript:void(0);">مشاهده بیشتر</a>
|
||||
<a class="dropdown-item" href="javascript:void(0);">حذف</a>
|
||||
<div class="dropdown-menu dropdown-menu-end customStyle new-style-15" aria-labelledby="cardOpt3">
|
||||
<a class="dropdown-item" >تمدید</a>
|
||||
<NavLink class="dropdown-item" href="Cod">کالا ها</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span>فروش</span>
|
||||
<h3 class="card-title text-nowrap mb-1">4,679<span style="font-size: 14px">تومان</span></h3>
|
||||
<small class="text-success fw-semibold"><i class='bx bx-up-arrow-alt'></i> +28.42%</small>
|
||||
<span class="fw-semibold d-block">کالا <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 4 && w.CalTypeID == 1))
|
||||
{
|
||||
@if (!dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First().Equals("-"))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
|
||||
}
|
||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 4 && w.CalTypeID == 2))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
نامحدود
|
||||
</small>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (Convert.ToInt32(dashBoard.Datenow) <= Convert.ToInt32(@dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First().Replace("/", "")))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 4 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Total Revenue -->
|
||||
@@ -127,52 +221,144 @@
|
||||
<!--/ Total Revenue -->
|
||||
<div class="col-12 col-md-8 col-lg-4 order-3 order-md-2">
|
||||
<div class="row">
|
||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 5))
|
||||
{
|
||||
<div class="col-6 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title d-flex align-items-start justify-content-between">
|
||||
<div class="avatar flex-shrink-0">
|
||||
<img src="assets/img/icons/unicons/paypal.png" alt="Credit Card" class="rounded">
|
||||
<img src="assets/img/icons/unicons/cc-primary.png" alt="chart success" class="rounded">
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="btn p-0" type="button" id="cardOpt4" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<button class="btn p-0" type="button" id="cardOpt3" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="bx bx-dots-vertical-rounded"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-end customStyle new-style-15" aria-labelledby="cardOpt4">
|
||||
<a class="dropdown-item" href="javascript:void(0);">نمایش بیشتر</a>
|
||||
<a class="dropdown-item" href="javascript:void(0);">حذف</a>
|
||||
<div class="dropdown-menu dropdown-menu-end customStyle new-style-15" aria-labelledby="cardOpt3">
|
||||
<a class="dropdown-item">تمدید</a>
|
||||
<NavLink class="dropdown-item" href="Customer">مشتری ها</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="d-block mb-1">مبلغ پرداختی</span>
|
||||
<h3 class="card-title text-nowrap mb-2">2,456<span style="font-size: 14px">تومان</span></h3>
|
||||
<small class="text-danger fw-semibold"><i class='bx bx-down-arrow-alt'></i> -14.82%</small>
|
||||
<span class="fw-semibold d-block">مشتری <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 5 && w.CalTypeID == 1))
|
||||
{
|
||||
@if (!dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First().Equals("-"))
|
||||
{
|
||||
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
|
||||
}
|
||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 5 && w.CalTypeID == 2))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
نامحدود
|
||||
</small>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (Convert.ToInt32(dashBoard.Datenow) <= Convert.ToInt32(@dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First().Replace("/", "")))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 5 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (dashBoard != null && dashBoard.AlistofServices.Any(w => w.PermissionID == 16))
|
||||
{
|
||||
<div class="col-6 mb-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-title d-flex align-items-start justify-content-between">
|
||||
<div class="avatar flex-shrink-0">
|
||||
<img src="assets/img/icons/unicons/cc-primary.png" alt="Credit Card" class="rounded">
|
||||
<img src="assets/img/icons/unicons/paypal.png" alt="chart success" class="rounded">
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="btn p-0" type="button" id="cardOpt1" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<button class="btn p-0" type="button" id="cardOpt3" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="bx bx-dots-vertical-rounded"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu new-style-14" aria-labelledby="cardOpt1">
|
||||
<a class="dropdown-item" href="javascript:void(0);">نمایش بیشتر</a>
|
||||
<a class="dropdown-item" href="javascript:void(0);">حذف</a>
|
||||
<div class="dropdown-menu dropdown-menu-end customStyle new-style-15" aria-labelledby="cardOpt3">
|
||||
<a class="dropdown-item">تمدید</a>
|
||||
<NavLink class="dropdown-item" href="TaxPayer">سامانه مودیان</NavLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span class="fw-semibold d-block mb-1">معاملات</span>
|
||||
<h3 class="card-title mb-2">14,857<span style="font-size: 14px">تومان</span></h3>
|
||||
<small class="text-success fw-semibold"><i class='bx bx-up-arrow-alt'></i> +28.14%</small>
|
||||
<span class="fw-semibold d-block">سامانه مودیان <br /> (کل @dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Total).First())</span>
|
||||
<h3 class="card-title mb-1"><span style="font-size: 14px">مانده</span></h3>
|
||||
@if (dashBoard.AlistofServices.Any(w => w.PermissionID == 16 && w.CalTypeID == 1))
|
||||
{
|
||||
@if (!dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First().Equals("-"))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
@dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First() آیتم
|
||||
</small>
|
||||
}
|
||||
|
||||
}
|
||||
else if (dashBoard.AlistofServices.Any(w => w.PermissionID == 16 && w.CalTypeID == 2))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
نامحدود
|
||||
</small>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (Convert.ToInt32(dashBoard.Datenow) <= Convert.ToInt32(@dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First().Replace("/", "")))
|
||||
{
|
||||
<small class="text-success fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
else
|
||||
{
|
||||
<small class="text-danger fw-semibold">
|
||||
<i class='bx'></i>
|
||||
تا تاریخ @dashBoard.AlistofServices.Where(w => w.PermissionID == 16 && w.CalTypeID == 1).Select(s => s.Remaining).First()
|
||||
</small>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- </div>
|
||||
<div class="row"> -->
|
||||
<div class="col-12 mb-4">
|
||||
@@ -448,11 +634,19 @@
|
||||
|
||||
|
||||
@code {
|
||||
public DashBoardDTO? dashBoard { get; set; }
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
if (!await localserv.OnlineUser())
|
||||
nav.NavigateTo("/");
|
||||
|
||||
|
||||
var rsp = await hc.Get("User/GetDashBoard");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
dashBoard = await rsp.Content.ReadFromJsonAsync<DashBoardDTO>();
|
||||
}
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
@using Shared
|
||||
@using Shared.DTOs
|
||||
@using Shared.DTOs.Serch
|
||||
|
||||
<Modal @ref="modal" />
|
||||
<Preload LoadingText="در حال بارگذاری..." />
|
||||
@* search *@
|
||||
<div class="row">
|
||||
@@ -33,7 +33,7 @@
|
||||
@foreach (InvoiceType i in Enum.GetValues(typeof(InvoiceType)))
|
||||
{
|
||||
|
||||
<option value="@Convert.ToInt32(i)">@i.GetEnumDisplayName()</option>
|
||||
<option value="@i">@i.GetEnumDisplayName()</option>
|
||||
|
||||
|
||||
}
|
||||
@@ -46,13 +46,16 @@
|
||||
@foreach (SentStatus i in Enum.GetValues(typeof(SentStatus)))
|
||||
{
|
||||
|
||||
<option value="@Convert.ToInt32(i)">@i.GetEnumDisplayName()</option>
|
||||
<option value="@i">@i.GetEnumDisplayName()</option>
|
||||
|
||||
|
||||
}
|
||||
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<button @onclick="() => Load(1)" type="submit" class="btn btn-primary">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -99,8 +102,10 @@
|
||||
}
|
||||
|
||||
@code {
|
||||
private Modal modal = default!;
|
||||
[Inject] protected PreloadService PreloadService { get; set; } = default!;
|
||||
ItemSerchGetSentTax itemsearch = new ItemSerchGetSentTax();
|
||||
[Parameter]
|
||||
public int? routed { get; set; } = 0;
|
||||
// alert
|
||||
AlertColor alertColor = AlertColor.Primary;
|
||||
@@ -128,7 +133,23 @@
|
||||
@functions{
|
||||
public async Task SentTaxItem(int ID)
|
||||
{
|
||||
|
||||
var rsp = await hc.Get($"TaxPayer/GetResult/{ID}");
|
||||
if (rsp.IsSuccessStatusCode)
|
||||
{
|
||||
var requestsendTax = await rsp.Content.ReadFromJsonAsync<DataInSendTaxDto>();
|
||||
//عویض کردن اطلاعات در گرید
|
||||
var ingriddata= request.list.Where(w => w.ID == ID).First();
|
||||
ingriddata.SentStatus = requestsendTax.SentStatus;
|
||||
ingriddata.msgSentStatus = requestsendTax.msgSentStatus;
|
||||
//-----------------
|
||||
var parameters = new Dictionary<string, object>();
|
||||
parameters.Add("inData", requestsendTax);
|
||||
await modal.ShowAsync<CUSComponent.SendTaxItem>(title: "وضعیت صورتحساب ارسالی", parameters: parameters);
|
||||
}
|
||||
else{
|
||||
var request = await rsp.Content.ReadFromJsonAsync<List<string>>();
|
||||
ShowDangerAlert(request[0]);
|
||||
}
|
||||
}
|
||||
public async Task Load(int pi)
|
||||
{
|
||||
|
Reference in New Issue
Block a user