This commit is contained in:
mmrbnjd
2024-10-14 15:56:45 +03:30
parent a5c191f9ea
commit 35cad6876b
10 changed files with 127 additions and 63 deletions

View File

@@ -98,6 +98,8 @@ namespace Back.Controllers
{
case "NewTicketNoAuthentication":
Sucstatus = await _servValidatinMsg.SubmittedTicket(VerificationCode);
if (Sucstatus) _servSendMsg.SuccessfulSubmitTicket(VerificationCode.val, VerificationCode.prm);
break;
case "CompanyRegistration":

View File

@@ -28,6 +28,10 @@
// "اطلاعات کاربری:" + '\n' +
// $"نام کاربری : {Username}" +
// $"کلمه عبور : {Password}", to);
}
public void SuccessfulSubmitTicket(string To, string Code)
{
SendByPattern(new string[] { Code }, 258239, To);
}
//public void Authentication(string to,string code) => SendMsgByPatern(code, to, 0);
//

View File

@@ -94,16 +94,16 @@
}
else
{
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
ثبت تغییرات
</Button>
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
حذف
</Button>
@if (_UsedInTheInvoice)
{
<Button class="mt-3" Color="ButtonColor.Link" @onclick="OnClickGoToInvoice" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Link" @onclick="OnClickGoToInvoice" Type="ButtonType.Button">
صورتحساب های مرتبط
</Button>
}
@@ -139,6 +139,7 @@ else
Hidealert = true;
alertMessage = "";
await UsedInTheInvoice();
SpinnerVisible = false;
await base.OnParametersSetAsync();
}
}

View File

@@ -30,11 +30,11 @@
<label class="col-sm-4 col-form-label" style="color:red" for="inputFullName">نام کامل</label>
@if (Cus.ID == 0 || !_UsedInTheInvoice)
{
<InputText @bind-Value="Cus.FullName" type="text" class="form-control" id="inputFullName" placeholder="نام کامل" />
<InputText style="text-align:center" @bind-Value="Cus.FullName" type="text" class="form-control" id="inputFullName" placeholder="نام کامل" />
}
else
{
<InputText @bind-Value="Cus.FullName" type="text" class="form-control" id="inputFullName" placeholder="نام کامل" readonly />
<InputText style="text-align:center" @bind-Value="Cus.FullName" type="text" class="form-control" id="inputFullName" placeholder="نام کامل" readonly />
}
</div>
<div class="form-group col-md-6">
@@ -52,81 +52,85 @@
<div class="row g-3">
<div class="col-md-6">
<label class="col-sm-4 col-form-label">تلفن</label>
<InputText @bind-Value="Cus.Phone" type="text" class="form-control" id="inputPhone" placeholder="تلفن" />
<InputText style="text-align:center" dir="ltr" @bind-Value="Cus.Phone" type="number" class="form-control" id="inputPhone" placeholder="تلفن" />
</div>
<div class="col-md-6">
<label class="col-sm-4 col-form-label">آدرس</label>
<InputText @bind-Value="Cus.Address" type="text" class="form-control" id="inputAddress" placeholder="آدرس" />
<InputText style="text-align:center" @bind-Value="Cus.Address" type="text" class="form-control" id="inputAddress" placeholder="آدرس" />
</div>
</div>
<div class="row g-3">
<div class="col-md-6">
<label class="col-sm-4 col-form-label">پست الکترونیک</label>
<InputText @bind-Value="Cus.Email" type="email" class="form-control" id="inputEmail" placeholder="پست الکترونیک" />
<InputText @bind-Value="Cus.Email" style="text-align:center" dir="ltr" type="email" class="form-control" id="inputEmail" placeholder="پست الکترونیک" />
</div>
<div class="col-md-6">
<label class="col-sm-4 col-form-label">کد پستی</label>
<InputText @bind-Value="Cus.ZipCode" type="text" class="form-control" id="inputZipCode" placeholder="کد پستی" />
<InputText style="text-align:center" dir="ltr" @bind-Value="Cus.ZipCode" type="number" class="form-control" id="inputZipCode" placeholder="کد پستی" />
</div>
</div>
<div class="row g-3">
<div class="col-md-6">
<label class="col-sm-4 col-form-label">کد اقتصادی</label>
<InputText @bind-Value="Cus.EconomicCode" type="text" class="form-control" id="inputEconomicCode" placeholder="کد اقتصادی" />
<InputText @bind-Value="Cus.EconomicCode" type="number" style="text-align:center" dir="ltr" class="form-control" id="inputEconomicCode" placeholder="کد اقتصادی" />
</div>
<div class="col-md-6">
<label class="col-sm-4 col-form-label">کدملی / شناسه ملی</label>
<InputText @bind-Value="Cus.MeliCode" type="text" class="form-control" id="inputMeliCode" placeholder="کدملی / شناسه ملی" />
<label class="col-sm-4 col-form-label">کد/شناسه ملی</label>
<InputText @bind-Value="Cus.MeliCode" type="number" style="text-align:center" dir="ltr" class="form-control" id="inputMeliCode" placeholder="کدملی / شناسه ملی" />
</div>
</div>
<div class="row g-3">
<div class="col-md-6">
<label class="col-sm-4 col-form-label">کد شعبه</label>
<InputText @bind-Value="Cus.BranchID" type="text" class="form-control" id="inputBranchID" placeholder="کد شعبه" />
<InputText @bind-Value="Cus.BranchID" type="number" style="text-align:center" dir="ltr" class="form-control" id="inputBranchID" placeholder="کد شعبه" />
</div>
<div class="col-md-6">
<label class="col-sm-4 col-form-label">شماره گذرنامه</label>
<InputText @bind-Value="Cus.PassportNumber" type="text" class="form-control" id="inputPassportNumber" placeholder="شماره گذرنامه" />
<InputText @bind-Value="Cus.PassportNumber" type="number" style="text-align:center" dir="ltr" class="form-control" id="inputPassportNumber" placeholder="شماره گذرنامه" />
</div>
</div>
<div class="row g-3">
<div class="col-md-12">
<label class="col-sm-4 col-form-label">توضیحات</label>
<InputTextArea @bind-Value="Cus.Info" class="form-control" id="inputMeliInfo" placeholder="توضیحات" rows="3"></InputTextArea>
<InputTextArea @bind-Value="Cus.Info" style="text-align:right" class="form-control" id="inputMeliInfo" placeholder="توضیحات" rows="3"></InputTextArea>
</div>
</div>
</form>
<div class="row g-3">
<div class="col-md-10">
@if (Cus.ID == 0)
{
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class=" mt-3" Color="ButtonColor.Success" @onclick="OnClickAdd" Type="ButtonType.Button">
جدید
</Button>
}
else
{
<Button class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Success" @onclick="OnClickUpdate" Type="ButtonType.Button">
ثبت تغییرات
</Button>
<Button class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Danger" @onclick="ShowConfirmationDeleteAsync" Type="ButtonType.Button">
حذف
</Button>
@if (_UsedInTheInvoice)
{
<Button class="mt-3" Color="ButtonColor.Link" @onclick="OnClickGoToInvoice" Type="ButtonType.Button">
<Button Disabled="SpinnerVisible" class="mt-3" Color="ButtonColor.Link" @onclick="OnClickGoToInvoice" Type="ButtonType.Button">
صورتحساب های مرتبط
</Button>
}
}
</div>
<div class="col-md-2" style="align-content:center">
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
</div>
</div>
@code {
public bool SpinnerVisible { get; set; } = false;
// alert
AlertColor alertColor = AlertColor.Primary;
IconName alertIconName = IconName.CheckCircleFill;
@@ -150,6 +154,7 @@ else
Hidealert = true;
alertMessage = "";
await UsedInTheInvoice();
SpinnerVisible = false;
await base.OnParametersSetAsync();
}
}
@@ -174,7 +179,7 @@ else
}
public async Task OnClickDelete()
{
SpinnerVisible = !SpinnerVisible;
var rsp = await hc.Delete($"Customer/Delete/{Cus.ID}");
if (rsp.IsSuccessStatusCode)
{
@@ -193,13 +198,14 @@ else
ShowDangerAlert("مشتری با این شناسه یافت نشد");
}
else ShowDangerAlert("خطایی در اجرای عملیات رخ داده");
SpinnerVisible = !SpinnerVisible;
}
public async Task OnClickUpdate()
{
SpinnerVisible = !SpinnerVisible;
if (ItemSearchCustomertype > 0 && !string.IsNullOrEmpty(Cus.FullName))
{
if (ItemSearchCustomertype > 0)
@@ -224,9 +230,11 @@ else
}
}
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
SpinnerVisible = !SpinnerVisible;
}
public async Task OnClickAdd()
{
SpinnerVisible = !SpinnerVisible;
if (ItemSearchCustomertype > 0 && !string.IsNullOrEmpty(Cus.FullName))
{
if (ItemSearchCustomertype > 0)
@@ -255,9 +263,11 @@ else
}
}
else ShowDangerAlert("فیلدهای قرمز باید مقدار دهی شوند");
SpinnerVisible = !SpinnerVisible;
}
public async Task UsedInTheInvoice()
{
SpinnerVisible = !SpinnerVisible;
if (Cus.ID!=0)
{
var rsp = await hc.Get($"Customer/UsedInTheInvoice/{Cus.ID}");
@@ -266,6 +276,7 @@ else
else _UsedInTheInvoice = false;
}
SpinnerVisible = !SpinnerVisible;
}
private async Task ShowConfirmationDeleteAsync()

View File

@@ -42,33 +42,36 @@
<div class="row gx-20">
<div class="col-12">
<div class="postbox__comment-input mb-30">
<InputText onkeydown="@OnClearmessageStore" @bind-Value="model.FullName" id="FullName" type="text" class="inputText" required="" />
<InputText style="text-align:center" onkeydown="@OnClearmessageStore" @bind-Value="model.FullName" id="FullName" type="text" class="inputText" required="" />
<span class="floating-label">نام شما</span>
</div>
</div>
<div class="col-12">
<div class="postbox__comment-input mb-35">
<InputText onkeydown="@OnClearmessageStore" @bind-Value="model.Mobile" id="Mobile" type="text" class="inputText" required="" />
<InputText dir="ltr" style="text-align:center" onkeydown="@OnClearmessageStore" @bind-Value="model.Mobile" id="Mobile" type="number" class="inputText" required="" />
<span class="floating-label">موبایل</span>
</div>
</div>
<div class="col-12">
<div class="postbox__comment-input mb-35">
<InputText @bind-Value="model.Title" id="Title" type="text" class="inputText" required=""/>
<InputText style="text-align:right" @bind-Value="model.Title" id="Title" type="text" class="inputText" required="" />
<span class="floating-label">عنوان</span>
</div>
</div>
<div class="col-xxl-12">
<div class="postbox__comment-input mb-30">
<InputText @bind-Value="model.Text" id="Text" class="textareaText" required=""></InputText>
<InputText style="text-align:right" @bind-Value="model.Text" id="Text" class="textareaText" required=""></InputText>
<span class="floating-label-2">پیام شما ...</span>
</div>
</div>
<div class="col-xxl-12">
<div class="col-xxl-10">
<div class="postbox__btn-box">
<button type="submit" class="submit-btn w-100">ارسال پیام</button>
<Button Disabled="SpinnerVisible" Type="ButtonType.Submit" Color="ButtonColor.Primary">ارسال پیام</Button>
</div>
</div>
<div class="col-md-2" style="align-content:center">
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
</div>
</div>
</EditForm>
@@ -83,7 +86,7 @@
@code {
public bool SpinnerVisible { get; set; } = false;
string type = "NewTicketNoAuthentication";
private EditContext? editContext;
[SupplyParameterFromForm]
@@ -97,7 +100,7 @@
// editContext = new(modelTaxTools);
// editContext.OnValidationRequested += HandleValidationRequested;
// messageStore = new(editContext);
SpinnerVisible = false;
editContext = new EditContext(model);
messageStore = new(editContext);
}
@@ -105,7 +108,7 @@
@functions{
private async Task OnClearmessageStore() => messageStore?.Clear();
private async Task newTicket(){
SpinnerVisible = true;
var request = await _hc.PostAsJsonAsync("Ticket/NewTicketNoAuthentication", model);
if (request.IsSuccessStatusCode)
{
@@ -119,6 +122,7 @@
messageStore?.Add(() => model.Mobile, error);
}
SpinnerVisible = false;
}

View File

@@ -54,25 +54,28 @@
<div class="row">
<div class="col-12">
<div class="postbox__comment-input mb-30">
<InputText onkeydown="@OnClearmessageStore" @bind-Value="model.CompanyName" id="CompanyName" type="text" class="inputText" required="" />
<InputText style="text-align:center" onkeydown="@OnClearmessageStore" @bind-Value="model.CompanyName" id="CompanyName" type="text" class="inputText" required="" />
<span class="floating-label">نام کامل</span>
</div>
</div>
<div class="col-12">
<div class="postbox__comment-input mb-30">
<InputText onkeydown="@OnClearmessageStore" @bind-Value="model.Mobile" id="Mobile" type="text" class="inputText" required="" />
<InputText style="text-align:center" dir="ltr" onkeydown="@OnClearmessageStore" @bind-Value="model.Mobile" id="Mobile" type="number" class="inputText" required="" />
<span class="floating-label">موبایل</span>
</div>
</div>
</div>
<div class="col-2">
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
</div>
<div class="signin-banner-from-btn mb-20">
<button type="submit" class="signin-btn ">ثبت نام</button>
<button hidden="@hidden" type="submit" class="signin-btn ">ثبت نام</button>
</div>
</EditForm>
<div class="signin-banner-from-register">
<NavLink href="Sign-in">ثبت نام کردید؟ <span>ورود</span></NavLink>
<NavLink hidden="@hidden" href="Sign-in">ثبت نام کردید؟ <span>ورود</span></NavLink>
</div>
</div>
</div>
@@ -82,6 +85,8 @@
</main>
@code {
public string hidden { get; set; }
public bool SpinnerVisible { get; set; } = false;
string type = "CompanyRegistration";
private EditContext? editContext;
[SupplyParameterFromForm]
@@ -104,6 +109,8 @@
private async Task OnClearmessageStore() => messageStore?.Clear();
private async Task OnRegisterClick()
{
SpinnerVisible = !SpinnerVisible;
hidden = "hidden";
var request = await _hc.PostAsJsonAsync("Base/CompanyRegistration", model);
if (request.IsSuccessStatusCode)
{
@@ -117,5 +124,7 @@
messageStore?.Add(() => model.Mobile, error);
}
hidden = null;
SpinnerVisible = !SpinnerVisible;
}
}

View File

@@ -57,14 +57,14 @@
<div class="row">
<div class="col-12">
<div class="postbox__comment-input mb-30">
<InputText @bind-Value="Model.Username" id="Username" type="text" class="inputText" required="" />
<InputText @bind-Value="Model.Username" style="text-align:center" id="Username" type="text" class="inputText" required="" />
<span class="floating-label">نام کاربری(موبایل)</span>
</div>
</div>
<div class="col-12">
<div class="postbox__comment-input mb-30">
<InputText @bind-Value="Model.Password" id="Password" class="inputText password" type="password" required="" />
<InputText @bind-Value="Model.Password" id="Password" style="text-align:center" class="inputText password" type="password" required="" />
<span class="floating-label">گذرواژه</span>
<span id="click" class="eye-btn">
<span class="eye-on">
@@ -105,7 +105,7 @@
</div>
<div class="col-6">
<div class="postbox__forget text-end">
<Button Color="ButtonColor.Link" @onclick="ForgetPass">رمز عبور را فراموش کرده اید؟</Button>
<Button Disabled="SpinnerVisible" Color="ButtonColor.Link" @onclick="ForgetPass">رمز عبور را فراموش کرده اید؟</Button>
</div>
</div>
@@ -114,7 +114,7 @@
<div class="row">
<div class="col-6">
<div class="signin-banner-from-btn mb-20">
<button class="signin-btn ">ورود</button>
<Button Type="ButtonType.Submit" Disabled="SpinnerVisible" class="signin-btn ">ورود</Button>
</div>
</div>
<div class="col-2">
@@ -137,7 +137,7 @@
</div>
<div class="signin-banner-from-register">
<NavLink href="Register">اکانت ندارید؟ <span>ثبت نام</span></NavLink>
<NavLink hidden=@hidden href="Register">اکانت ندارید؟ <span>ثبت نام</span></NavLink>
</div>
</div>
</div>
@@ -148,6 +148,7 @@
</main>
@code {
public string hidden { get; set; }
public bool SpinnerVisible { get; set; } = false;
[Parameter]
public string from { get; set; } = "";
@@ -176,8 +177,9 @@
else if (from == "changePass")
{
ShowSuccessAlert("کلمه عبور با موفقیت تغییر کرد");
}
SpinnerVisible = false;
await base.OnParametersSetAsync();
}
protected override async Task OnInitializedAsync()
@@ -210,6 +212,8 @@
private async Task EndForm() => nav.NavigateTo("/");
private async Task ForgetPass()
{
hidden = "hidden";
SpinnerVisible = !SpinnerVisible;
if (string.IsNullOrEmpty(Model.Username))
{
ShowDangerAlert("لطفا نام کابری(موبایل) خود را وارد نمایید");
@@ -237,10 +241,13 @@
}
}
hidden = null;
SpinnerVisible = !SpinnerVisible;
}
private async Task OnLoginClick()
{
hidden = "hidden";
SpinnerVisible = true;
_hc.DefaultRequestHeaders.Clear();
var request = await _hc.PostAsJsonAsync("User/authenticate", Model);
@@ -253,8 +260,8 @@
_hc.DefaultRequestHeaders.Add("Authorization",
$"Bearer {userinfomodel?.Token}");
if (Model.Remember)
Storage.SetItem("token", userinfomodel?.Token);
if (Model.Remember)
Storage.SetItem("token", userinfomodel?.Token);
userinfo.Token = userinfomodel?.Token;
userinfo.Company = userinfomodel?.Company;
@@ -271,6 +278,7 @@
else ShowDangerAlert("خطای سیستمی");
SpinnerVisible = false ;
hidden = null;
}
}

View File

@@ -27,7 +27,7 @@
<input @bind-value="itemsearch.Title" placeholder="نام کالا" style="text-align:center;" class="form-control" type="text">
</div>
<div class="col-md-2">
<select @bind="itemsearch.UnitID" class="form-control" aria-label="Default select example">
<select style="text-align:center" @bind="itemsearch.UnitID" class="form-control" aria-label="Default select example">
<option value="0" style="color: #b5b5b5" selected>واحد اندازه گیری ...</option>
@if (Unitrequest!=null)
{

View File

@@ -5,7 +5,7 @@
@using Shared.DTOs.Serch
@inject HttpClientController hc;
<PageTitle>مشتری</PageTitle>
<Modal Size="ModalSize.ExtraLarge" @ref="modal" />
<Modal Size="ModalSize.Regular" @ref="modal" />
<Preload LoadingText="در حال بارگذاری..." />
@* search *@
@@ -21,10 +21,10 @@
<li class="list-group-item" data-toggle="modal" data-target="#issue">
<div class="row g-3">
<div class="col-md-1">
<input @bind-value="itemsearch.ID" placeholder="شناسه" style="text-align:center;" class="form-control" type="text" >
<input @bind-value="itemsearch.ID" placeholder="شناسه" style="text-align:center" dir="ltr" class="form-control" type="number">
</div>
<div class="col-md-2">
<select @bind="ItemSearchCustomertype" class="form-control" aria-label="Default select example">
<select style="text-align:center" @bind="ItemSearchCustomertype" class="form-control" aria-label="Default select example">
<option value="0" style="color: #b5b5b5" selected>نوع مشتری...</option>
<option value="1">حقیقی</option>
<option value="2">حقوقی</option>
@@ -33,13 +33,13 @@
</select>
</div>
<div class="col-md-2">
<input @bind-value="itemsearch.EconomicCode" placeholder="کد اقتصادی / کدملی" style="text-align:center;" class="form-control" type="text">
<input @bind-value="itemsearch.EconomicCode" placeholder="کد اقتصادی / کدملی" style="text-align:center" dir="ltr" class="form-control" type="number">
</div>
<div class="col-md-2">
<input @bind-value="itemsearch.Phone" placeholder="تلفن" style="text-align:center;" class="form-control" type="text">
<input @bind-value="itemsearch.Phone" placeholder="تلفن" style="text-align:center" dir="ltr" class="form-control" type="number">
</div>
<div class="col-md-2">
<input @bind-value="itemsearch.ZipCode" placeholder="کد پستی" style="text-align:center;" class="form-control" type="text">
<input @bind-value="itemsearch.ZipCode" placeholder="کد پستی" style="text-align:center" dir="ltr" class="form-control" type="number">
</div>
<div class="col-auto">
<button @onclick="() => LoadCus(1)" type="submit" class="btn btn-primary">جستجو</button>

View File

@@ -4,6 +4,7 @@
@inject NavigationManager nav
@inject UserAuthenticationDTO userinfo
<PageTitle>احراز هویت</PageTitle>
<Toasts class="p-3" Messages="messages" AutoHide="true" Delay="5000" Placement="ToastsPlacement.BottomLeft" />
<main>
<!-- tp-banner-area-start -->
@@ -48,14 +49,17 @@
<div class="row">
<div class="col-12">
<div class="col-10">
<div class="postbox__comment-input mb-30">
<InputNumber @bind-Value="VerificationCodeModel.Code" style="text-align: center" id="Code" type="text" class="inputText" required="" />
<InputText @bind-Value="valueCode" style="text-align: center" id="Code" type="number" class="inputText" required="" />
<span class="floating-label">کد تائید</span>
</div>
</div>
<div class="col-md-2" style="align-content:center">
<Spinner Visible="SpinnerVisible" Color="SpinnerColor.Primary" />
</div>
<div class="signin-banner-from-btn mb-20">
<button type="submit" class="signin-btn">احراز</button>
<button hidden="@hidden" type="submit" class="signin-btn">احراز</button>
</div>
</div>
@@ -70,8 +74,7 @@
</div>
<div class="signin-banner-from-register">
<NavLink style="cursor:pointer" @onclick="ReSend">کد ارسال نشد؟ <span>ارسال مجدد</span></NavLink>
<NavLink hidden="@hidden" style="cursor:pointer" @onclick="ReSend">کد ارسال نشد؟ <span>ارسال مجدد</span></NavLink>
</div>
</div>
</div>
@@ -82,14 +85,19 @@
</main>
@code {
List<ToastMessage> messages = new List<ToastMessage>();
public string hidden { get; set; }
public bool SpinnerVisible { get; set; } = false;
public string valueCode { get; set; }
bool successfull = false;
// alert
AlertColor alertColor = AlertColor.Primary;
IconName alertIconName = IconName.CheckCircleFill;
bool Hidealert = true;
string alertMessage = "";
private void ShowMessage(ToastType toastType, string Message) => messages.Add(CreateToastMessage(toastType, Message));
[Parameter]
public int ID { get; set; }
@@ -108,7 +116,8 @@
{
nav.NavigateTo($"/");
}
hidden = null;
SpinnerVisible = false;
await base.OnParametersSetAsync();
}
}
@@ -116,6 +125,8 @@
private async Task ReSend()
{
hidden = "hidden";
SpinnerVisible = !SpinnerVisible;
var request = await _hc.GetAsync($"Verification/ReSend/{VerificationCodeModel?.ID}");
if (request.IsSuccessStatusCode)
@@ -128,10 +139,17 @@
ShowDangerAlert(listerror[0]);
}
SpinnerVisible = !SpinnerVisible;
hidden = null;
}
private async Task SubmitVerificationCode()
{
hidden = "hidden";
SpinnerVisible = !SpinnerVisible;
if (!int.TryParse(valueCode, out int code))
return;
VerificationCodeModel.Code = code;
if (VerificationCodeModel.Code < 1000 || VerificationCodeModel.Code > 9000)
{
ShowDangerAlert("کد احراز صحیح نمی باشد");
@@ -154,7 +172,7 @@
nav.NavigateTo("/Profile/Verification");
}
else
nav.NavigateTo("/");
@@ -171,7 +189,8 @@
ShowDangerAlert(listerror[0]);
}
}
SpinnerVisible = !SpinnerVisible;
hidden = null;
}
private void ShowSuccessAlert(string msg)
{
@@ -195,4 +214,10 @@
nav.NavigateTo("/Profile");
nav.NavigateTo("/");
}
private ToastMessage CreateToastMessage(ToastType toastType, string Message)
=> new ToastMessage
{
Type = toastType,
Message = Message,
};
}