docs: #319 ReviewPartEdits is finally showing up

This commit is contained in:
Hamid Reza Mohammadi 2022-05-13 17:11:11 +04:30
parent 1dfc33fb8a
commit bc01d15e3b
3 changed files with 5 additions and 27 deletions

View File

@ -92,17 +92,8 @@ else
</td>
</tr>
<tr>
<td>
@if (Model.PageInformation.Poem.Verses.Length > 0)
{
@Model.PageInformation.Poem.Verses[0].Text
}
</td>
<td>
@if (Model.PageInformation.Poem.Verses.Length > 1)
{
@Model.PageInformation.Poem.Verses[1].Text
}
<td colspan="2">
@Html.Raw(Model.PoemSection.HtmlText)
</td>
</tr>
<tr>

View File

@ -61,7 +61,7 @@ namespace GanjooRazor.Areas.Admin.Pages
{
if (await GanjoorSessionChecker.PrepareClient(secureClient, Request, Response))
{
var nextResponse = await secureClient.GetAsync($"{APIRoot.Url}/api/ganjoor/poem/correction/next?skip={Skip}");
var nextResponse = await secureClient.GetAsync($"{APIRoot.Url}/api/ganjoor/section/correction/next?skip={Skip}");
if (!nextResponse.IsSuccessStatusCode)
{
FatalError = JsonConvert.DeserializeObject<string>(await nextResponse.Content.ReadAsStringAsync());
@ -107,12 +107,7 @@ namespace GanjooRazor.Areas.Admin.Pages
if (Correction.Rhythm != null)
{
GanjoorMetre originalMetre = null;
if (PageInformation.Poem.Sections.Where(s => s.SectionType == PoemSectionType.WholePoem && s.GanjoorMetre != null && s.VerseType == VersePoemSectionType.First).Any())
{
originalMetre = PageInformation.Poem.Sections.Where(s => s.SectionType == PoemSectionType.WholePoem && s.VerseType == VersePoemSectionType.First && s.GanjoorMetre != null).OrderBy(s => s.VerseType).First().GanjoorMetre;
}
Correction.OriginalRhythm = originalMetre == null ? null : originalMetre.Rhythm;
Correction.OriginalRhythm = PoemSection.GanjoorMetre == null ? null : PoemSection.GanjoorMetre.Rhythm;
if (Correction.OriginalRhythm == Correction.Rhythm)
Correction.RhythmResult = CorrectionReviewResult.NotChanged;
}

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
@ -6,10 +6,6 @@
<StartupObject>GanjooRazor.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<Content Remove="Areas\Admin\Pages\ReviewPartEdits.cshtml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\RMuseum\RMuseum.csproj" />
</ItemGroup>
@ -26,8 +22,4 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<None Include="Areas\Admin\Pages\ReviewPartEdits.cshtml" />
</ItemGroup>
</Project>