This commit is contained in:
mmrbnjd
2024-10-12 22:01:42 +03:30
parent df0e414329
commit 694b14fec5
5 changed files with 9 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ namespace Back.Controllers
[AllowAnonymous] [AllowAnonymous]
public async Task<ActionResult<string>> CompanyRegistration([FromBody] CompanyRegistrationDTO item) public async Task<ActionResult<string>> CompanyRegistration([FromBody] CompanyRegistrationDTO item)
{ {
return BadRequest(new List<string> { "متاسفانه در مرحله آزمایش می باشیم و فعلا امکان ثبت نام نداریم"});
var resultValidationmodel = await _companyRegistrationValidation.ValidateAsync(item); var resultValidationmodel = await _companyRegistrationValidation.ValidateAsync(item);
if (!resultValidationmodel.IsValid) if (!resultValidationmodel.IsValid)
return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList()); return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList());

View File

@@ -91,7 +91,7 @@ builder.Services.AddCors(options =>
options.AddPolicy(origins, options.AddPolicy(origins,
policy => policy =>
{ {
policy.WithOrigins("https://localhost:7224", "http://localhost:5107", "http://195.88.208.142") policy.WithOrigins("https://localhost:7224", "http://localhost:5107", "http://195.88.208.142", "http://moadiran.ir")
.AllowAnyHeader() .AllowAnyHeader()
.WithHeaders(HeaderNames.ContentType) .WithHeaders(HeaderNames.ContentType)
.AllowAnyMethod(); .AllowAnyMethod();

View File

@@ -216,6 +216,7 @@
public async Task CallBack(int count) public async Task CallBack(int count)
{ {
countnot = count; countnot = count;
if(count==0) await modal.HideAsync();
} }
public async Task CreditDocuments() public async Task CreditDocuments()
{ {
@@ -231,7 +232,6 @@
parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<int>(this, CallBack)); parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create<int>(this, CallBack));
await modal.ShowAsync<Front.CUSComponent.Notifications>(title: "اطلاعیه ها", parameters: parameters); await modal.ShowAsync<Front.CUSComponent.Notifications>(title: "اطلاعیه ها", parameters: parameters);
} }
private async Task Logout() private async Task Logout()
{ {

View File

@@ -9,7 +9,7 @@
@inject Fixedvalues fv; @inject Fixedvalues fv;
<PageTitle>کاربری</PageTitle> <PageTitle>کاربری</PageTitle>
<Toasts class="p-3" Messages="messages" AutoHide="true" Delay="4000" Placement="ToastsPlacement.TopRight" /> <Toasts class="p-3" Messages="messages" AutoHide="true" Delay="delaymessage" Placement="ToastsPlacement.BottomLeft" />
<div class="row"> <div class="row">
@@ -406,6 +406,7 @@
@code { @code {
int delaymessage = 0;
List<ToastMessage> messages = new List<ToastMessage>(); List<ToastMessage> messages = new List<ToastMessage>();
private Modal modal = default!; private Modal modal = default!;
private void ShowMessage(ToastType toastType, string Message) => messages.Add(CreateToastMessage(toastType, Message)); private void ShowMessage(ToastType toastType, string Message) => messages.Add(CreateToastMessage(toastType, Message));
@@ -420,7 +421,7 @@
foreach (var war in fv.dashBoard.Warning) foreach (var war in fv.dashBoard.Warning)
ShowMessage((ToastType)Enum.Parse(typeof(ToastType), war.Status.ToString()), war.Message); ShowMessage((ToastType)Enum.Parse(typeof(ToastType), war.Status.ToString()), war.Message);
delaymessage = messages.Count * 5000;
//var rsp = await hc.Get("User/GetDashBoard"); //var rsp = await hc.Get("User/GetDashBoard");
// if (rsp.IsSuccessStatusCode) // if (rsp.IsSuccessStatusCode)
// { // {

View File

@@ -33,10 +33,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO()
}) ; }) ;
// Server // Server
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") }); builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://195.88.208.142:7075/api/") });
//Home //Home
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });
//farzan //farzan
//builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") }); //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });