From 694b14fec5c516c84ef0950fac3a9dd90a3046eb Mon Sep 17 00:00:00 2001 From: mmrbnjd Date: Sat, 12 Oct 2024 22:01:42 +0330 Subject: [PATCH] ... --- Back/Controllers/BaseController.cs | 2 +- Back/Program.cs | 2 +- TaxPayerFull/Layout/PanelLayout.razor | 2 +- TaxPayerFull/Pages/UserPanel/Panel.razor | 7 ++++--- TaxPayerFull/Program.cs | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Back/Controllers/BaseController.cs b/Back/Controllers/BaseController.cs index 110ede6..842fffd 100644 --- a/Back/Controllers/BaseController.cs +++ b/Back/Controllers/BaseController.cs @@ -82,7 +82,7 @@ namespace Back.Controllers [AllowAnonymous] public async Task> CompanyRegistration([FromBody] CompanyRegistrationDTO item) { - + return BadRequest(new List { "متاسفانه در مرحله آزمایش می باشیم و فعلا امکان ثبت نام نداریم"}); var resultValidationmodel = await _companyRegistrationValidation.ValidateAsync(item); if (!resultValidationmodel.IsValid) return BadRequest(resultValidationmodel.Errors.Select(s => s.ErrorMessage).ToList()); diff --git a/Back/Program.cs b/Back/Program.cs index 3406d17..e78cca4 100644 --- a/Back/Program.cs +++ b/Back/Program.cs @@ -91,7 +91,7 @@ builder.Services.AddCors(options => options.AddPolicy(origins, 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() .WithHeaders(HeaderNames.ContentType) .AllowAnyMethod(); diff --git a/TaxPayerFull/Layout/PanelLayout.razor b/TaxPayerFull/Layout/PanelLayout.razor index ed3ad89..7dcaec4 100644 --- a/TaxPayerFull/Layout/PanelLayout.razor +++ b/TaxPayerFull/Layout/PanelLayout.razor @@ -216,6 +216,7 @@ public async Task CallBack(int count) { countnot = count; + if(count==0) await modal.HideAsync(); } public async Task CreditDocuments() { @@ -231,7 +232,6 @@ parameters.Add("OnMultipleOfThree", EventCallback.Factory.Create(this, CallBack)); await modal.ShowAsync(title: "اطلاعیه ها", parameters: parameters); - } private async Task Logout() { diff --git a/TaxPayerFull/Pages/UserPanel/Panel.razor b/TaxPayerFull/Pages/UserPanel/Panel.razor index 859bed6..8068dd8 100644 --- a/TaxPayerFull/Pages/UserPanel/Panel.razor +++ b/TaxPayerFull/Pages/UserPanel/Panel.razor @@ -9,7 +9,7 @@ @inject Fixedvalues fv; کاربری - +
@@ -406,10 +406,11 @@ @code { + int delaymessage = 0; List messages = new List(); private Modal modal = default!; private void ShowMessage(ToastType toastType, string Message) => messages.Add(CreateToastMessage(toastType, Message)); - // public DashBoardDTO? dashBoard { get; set; } + // public DashBoardDTO? dashBoard { get; set; } protected override async Task OnInitializedAsync() { @@ -420,7 +421,7 @@ foreach (var war in fv.dashBoard.Warning) ShowMessage((ToastType)Enum.Parse(typeof(ToastType), war.Status.ToString()), war.Message); - + delaymessage = messages.Count * 5000; //var rsp = await hc.Get("User/GetDashBoard"); // if (rsp.IsSuccessStatusCode) // { diff --git a/TaxPayerFull/Program.cs b/TaxPayerFull/Program.cs index f0789ae..7ddfa86 100644 --- a/TaxPayerFull/Program.cs +++ b/TaxPayerFull/Program.cs @@ -33,10 +33,10 @@ builder.Services.AddScoped(sp => new UserAuthenticationDTO() }) ; // 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 -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 //builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri("http://localhost:5271/api/") });