generated from havit/NewProjectTemplate-Blazor
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from Xopabyteh/master
Zrušení SigningRules, zjednodušení logiky
- Loading branch information
Showing
99 changed files
with
991 additions
and
1,848 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -259,3 +259,4 @@ Web/.vscode/launch.json | |
.vscode | ||
/WebAPI/App_Data | ||
.DS_Store | ||
/Web.Server/appsettings.WebServer.local.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
namespace MensaGymnazium.IntranetGen3.Contracts; | ||
using MensaGymnazium.IntranetGen3.Contracts.Security; | ||
|
||
namespace MensaGymnazium.IntranetGen3.Contracts; | ||
|
||
[ApiContract] | ||
public interface IStudentSubjectRegistrationFacade | ||
{ | ||
Task<DataFragmentResult<StudentSubjectRegistrationDto>> GetStudentSubjectRegistrationListAsync(DataFragmentRequest<StudentSubjectRegistrationListQueryFilter> studentSubjectRegistrationListRequest, CancellationToken cancellationToken = default); | ||
Task<Dto<int>> CreateRegistrationAsync(StudentSubjectRegistrationDto registrationDto, CancellationToken cancellationToken = default); | ||
Task UpdateRegistrationAsync(StudentSubjectRegistrationDto registrationDto, CancellationToken cancellationToken = default); | ||
Task DeleteRegistrationAsync(Dto<int> registrationIdDto, CancellationToken cancellationToken = default); | ||
Task<DataFragmentResult<StudentSubjectRegistrationDto>> GetStudentSubjectRegistrationListAsync(DataFragmentRequest<StudentSubjectRegistrationListQueryFilter> studentSubjectRegistrationListRequest, CancellationToken cancellationToken = default); | ||
Task<List<StudentSubjectRegistrationDto>> GetAllRegistrationsOfCurrentStudent(); // Xopa: Todo? Change to query? It was too entangled with signing rules, but now it could be done? | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...cts/SigningRuleStudentRegistrationsDto.cs → Contracts/StudentRegistrationsDto.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
DataLayer/Queries/IStudentSigningRulesWithRegistrationsQuery.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
//using Havit.Data.Patterns.DataLoaders; | ||
//using MensaGymnazium.IntranetGen3.Contracts; | ||
//using MensaGymnazium.IntranetGen3.DataLayer.DataSources; | ||
//using MensaGymnazium.IntranetGen3.Model; | ||
//using MensaGymnazium.IntranetGen3.Model.Security; | ||
//using MensaGymnazium.IntranetGen3.Primitives; | ||
|
||
//namespace MensaGymnazium.IntranetGen3.DataLayer.Queries; | ||
|
||
//[Service] | ||
//public class StudentRegistrationsQuery : QueryBase<RegistrationsDto>, IStudentRegistrationsQuery | ||
//{ | ||
// protected Student Student { get; set; } | ||
// protected Subject SubjectFilter { get; set; } | ||
|
||
// protected override IQueryable<RegistrationsDto> Query() | ||
// { | ||
// Contract.Requires<ArgumentException>(Student is not null); | ||
|
||
// //var studentNextGrade = ((GradeEntry)this.Student.GradeId).NextGrade(); | ||
|
||
// //var signingRulesData = signingRuleDataSource.Data | ||
// //.Where(x => x.GradeId == (int)studentNextGrade); | ||
|
||
// //if (this.SubjectFilter is not null) | ||
// //{ | ||
// // signingRulesData = signingRulesData.Where(sr => this.SubjectFilter.GradeRelations.Select(gr => gr.GradeId).Contains(sr.GradeId)); | ||
// // signingRulesData = signingRulesData.Where(sr => sr.SubjectTypeRelations.Any(str => this.SubjectFilter.TypeRelations.Select(tr => tr.SubjectTypeId).Contains(str.SubjectTypeId))); | ||
// // signingRulesData = signingRulesData.Where(sr => sr.SubjectCategoryRelations.Any(scr => scr.SubjectCategoryId == this.SubjectFilter.CategoryId)); | ||
// //} | ||
|
||
|
||
|
||
// return signingRulesData.Select(sr => new RegistrationsDto() | ||
// { | ||
// Id = sr.Id, | ||
// GradeId = (GradeEntry)sr.GradeId, | ||
// Name = sr.Name, | ||
// Quantity = sr.Quantity, | ||
// SubjectCategoryIds = sr.SubjectCategoryRelations.Select(scr => scr.SubjectCategoryId).ToList(), | ||
// SubjectTypeIds = sr.SubjectTypeRelations.Select(str => str.SubjectTypeId).ToList(), | ||
// Registrations = sr.RegistrationsWithDeleted.Where(r => (r.StudentId == this.Student.Id) && (r.Deleted == null)) | ||
// .Select(ssr => new StudentSubjectRegistrationDto() | ||
// { | ||
// Id = ssr.Id, | ||
// StudentId = ssr.StudentId, | ||
// SigningRuleId = ssr.UsedSigningRuleId, | ||
// SubjectId = ssr.SubjectId, | ||
// RegistrationType = ssr.RegistrationType, | ||
// Created = ssr.Created, | ||
// }) | ||
// .ToList() | ||
// }); | ||
// } | ||
|
||
// public Task<List<RegistrationsDto>> GetDataAsync(Student student, Subject subjectFilter = null, CancellationToken cancellationToken = default) | ||
// { | ||
// Contract.Requires<ArgumentException>(student is not null); | ||
|
||
// this.Student = student; | ||
// this.SubjectFilter = subjectFilter; | ||
|
||
// return this.SelectAsync(cancellationToken); | ||
// } | ||
//} |
Oops, something went wrong.