├── .gitattributes ├── .gitignore ├── LICENSE ├── README-pt_pt.md ├── README.md ├── SCManagement.AutomationTests ├── ClubTests.cs ├── EventTests.cs ├── PlansTests.cs ├── SCManagement.AutomationTests.csproj ├── UseBackOffice.cs └── Usings.cs ├── SCManagement.Tests ├── Controller │ ├── ClubsControllerTests.cs │ ├── EventsControllerTests.cs │ ├── HomeControllerTests.cs │ ├── MyClubControllerTests.cs │ ├── MyZoneControllerTests.cs │ ├── PlansControllerTests.cs │ ├── TranslationControllerTests.cs │ └── UserControllerTests.cs ├── SCManagement.Tests.csproj ├── Services │ ├── AzureStorageTests.cs │ ├── ClubServiceTests.cs │ ├── EventServiceTests.cs │ ├── PlanServiceTests.cs │ ├── StatisticsServiceTests.cs │ ├── TeamServiceTests.cs │ ├── TranslationServiceTests.cs │ └── UserServiceTests.cs ├── UnitTest1.cs └── Usings.cs ├── SCManagement.sln ├── SCManagement ├── .editorconfig ├── Areas │ └── Identity │ │ └── Pages │ │ ├── Account │ │ ├── AccessDenied.cshtml │ │ ├── AccessDenied.cshtml.cs │ │ ├── ConfirmEmail.cshtml │ │ ├── ConfirmEmail.cshtml.cs │ │ ├── ConfirmEmailChange.cshtml │ │ ├── ConfirmEmailChange.cshtml.cs │ │ ├── ExternalLogin.cshtml │ │ ├── ExternalLogin.cshtml.cs │ │ ├── ForgotPassword.cshtml │ │ ├── ForgotPassword.cshtml.cs │ │ ├── ForgotPasswordConfirmation.cshtml │ │ ├── ForgotPasswordConfirmation.cshtml.cs │ │ ├── Login.cshtml │ │ ├── Login.cshtml.cs │ │ ├── Logout.cshtml │ │ ├── Logout.cshtml.cs │ │ ├── Manage │ │ │ ├── ChangePassword.cshtml │ │ │ ├── ChangePassword.cshtml.cs │ │ │ ├── Email.cshtml │ │ │ ├── Email.cshtml.cs │ │ │ ├── ExternalLogins.cshtml │ │ │ ├── ExternalLogins.cshtml.cs │ │ │ ├── Index.cshtml │ │ │ ├── Index.cshtml.cs │ │ │ ├── ManageNavPages.cs │ │ │ ├── PersonalData.cshtml │ │ │ ├── PersonalData.cshtml.cs │ │ │ ├── SetPassword.cshtml │ │ │ ├── SetPassword.cshtml.cs │ │ │ ├── _Layout.cshtml │ │ │ ├── _ManageNav.cshtml │ │ │ ├── _StatusMessage.cshtml │ │ │ └── _ViewImports.cshtml │ │ ├── Register.cshtml │ │ ├── Register.cshtml.cs │ │ ├── RegisterConfirmation.cshtml │ │ ├── RegisterConfirmation.cshtml.cs │ │ ├── ResendEmailConfirmation.cshtml │ │ ├── ResendEmailConfirmation.cshtml.cs │ │ ├── ResetPassword.cshtml │ │ ├── ResetPassword.cshtml.cs │ │ ├── ResetPasswordConfirmation.cshtml │ │ ├── ResetPasswordConfirmation.cshtml.cs │ │ ├── _StatusMessage.cshtml │ │ └── _ViewImports.cshtml │ │ ├── _ValidationScriptsPartial.cshtml │ │ ├── _ViewImports.cshtml │ │ └── _ViewStart.cshtml ├── Configurations.cs ├── Controllers │ ├── BackofficeController.cs │ ├── ClubsController.cs │ ├── EventsController.cs │ ├── HomeController.cs │ ├── MyClubController.cs │ ├── MyZoneController.cs │ ├── PaymentController.cs │ ├── PlansController.cs │ ├── StatisticsController.cs │ ├── SubscriptionController.cs │ ├── TranslationController.cs │ └── UserController.cs ├── Data │ ├── ApplicationDbContext.cs │ ├── Migrations │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ ├── 20221221145930_user_and_address.Designer.cs │ │ ├── 20221221145930_user_and_address.cs │ │ ├── 20221226131533_UserProfilePictureBlob.Designer.cs │ │ ├── 20221226131533_UserProfilePictureBlob.cs │ │ ├── 20221228190307_addressFixSeedData.Designer.cs │ │ ├── 20221228190307_addressFixSeedData.cs │ │ ├── 20221229161656_clubs_modalities_roles.Designer.cs │ │ ├── 20221229161656_clubs_modalities_roles.cs │ │ ├── 20221229180801_clubAccessCodes.Designer.cs │ │ ├── 20221229180801_clubAccessCodes.cs │ │ ├── 20230105175141_SelectedUserRole.Designer.cs │ │ ├── 20230105175141_SelectedUserRole.cs │ │ ├── 20230112182436_Teams.Designer.cs │ │ ├── 20230112182436_Teams.cs │ │ ├── 20230124113700_EMD.Designer.cs │ │ ├── 20230124113700_EMD.cs │ │ ├── 20230214142515_PaymentsSubcriptions.Designer.cs │ │ ├── 20230214142515_PaymentsSubcriptions.cs │ │ ├── 20230215181631_UpdateAddress.Designer.cs │ │ ├── 20230215181631_UpdateAddress.cs │ │ ├── 20230216134850_Events.Designer.cs │ │ ├── 20230216134850_Events.cs │ │ ├── 20230217155410_TaC_And_ClubTranslations.Designer.cs │ │ ├── 20230217155410_TaC_And_ClubTranslations.cs │ │ ├── 20230221155235_ClubPayments.Designer.cs │ │ ├── 20230221155235_ClubPayments.cs │ │ ├── 20230221172434_EventFix.Designer.cs │ │ ├── 20230221172434_EventFix.cs │ │ ├── 20230223174343_ClubPaymentsFix.Designer.cs │ │ ├── 20230223174343_ClubPaymentsFix.cs │ │ ├── 20230224161147_ClubRoleStatus.Designer.cs │ │ ├── 20230224161147_ClubRoleStatus.cs │ │ ├── 20230224192104_TranslationFix.Designer.cs │ │ ├── 20230224192104_TranslationFix.cs │ │ ├── 20230227171136_UpdateEvent.Designer.cs │ │ ├── 20230227171136_UpdateEvent.cs │ │ ├── 20230301211828_EventTranslation.Designer.cs │ │ ├── 20230301211828_EventTranslation.cs │ │ ├── 20230310155703_BioImpedance.Designer.cs │ │ ├── 20230310155703_BioImpedance.cs │ │ ├── 20230313175936_EventsEdit.Designer.cs │ │ ├── 20230313175936_EventsEdit.cs │ │ ├── 20230315220223_ClubStatistics.Designer.cs │ │ ├── 20230315220223_ClubStatistics.cs │ │ ├── 20230316110624_AddressUpdated.Designer.cs │ │ ├── 20230316110624_AddressUpdated.cs │ │ ├── 20230320142615_Plans.Designer.cs │ │ ├── 20230320142615_Plans.cs │ │ ├── 20230322225826_UpdatePlans.Designer.cs │ │ ├── 20230322225826_UpdatePlans.cs │ │ ├── 20230323143921_BioimpedanceHistory.Designer.cs │ │ ├── 20230323143921_BioimpedanceHistory.cs │ │ ├── 20230323233807_GoalComplete.Designer.cs │ │ ├── 20230323233807_GoalComplete.cs │ │ ├── 20230325235017_SystemStatistics.Designer.cs │ │ ├── 20230325235017_SystemStatistics.cs │ │ ├── 20230327101327_ModalityTranslations.Designer.cs │ │ ├── 20230327101327_ModalityTranslations.cs │ │ ├── 20230327203644_UpdatePlans2.Designer.cs │ │ ├── 20230327203644_UpdatePlans2.cs │ │ ├── 20230331180048_Notifications.Designer.cs │ │ ├── 20230331180048_Notifications.cs │ │ └── ApplicationDbContextModelSnapshot.cs │ └── dataset │ │ ├── concelhos.json │ │ └── distritos.json ├── GlobalUsings.cs ├── Middlewares │ ├── ClubMiddleware.cs │ └── RequestLocalizationCookiesMiddleware.cs ├── Models │ ├── Address.cs │ ├── Bioimpedance.cs │ ├── Club.cs │ ├── ClubPaymentSettings.cs │ ├── ClubTranslations.cs │ ├── CodeClub.cs │ ├── Country.cs │ ├── County.cs │ ├── District.cs │ ├── ErrorViewModel.cs │ ├── Event.cs │ ├── EventEnroll.cs │ ├── EventResult.cs │ ├── EventTranslation.cs │ ├── ITranslation.cs │ ├── Modality.cs │ ├── ModalityTranslation.cs │ ├── Notification.cs │ ├── RoleClub.cs │ ├── Team.cs │ ├── User.cs │ ├── UserSettings.cs │ ├── UsersRoleClub.cs │ └── Validations │ │ ├── DateGreaterThanAttribute.cs │ │ ├── DateOfBirthAttribute.cs │ │ └── IsDateBeforeTodayAttribute.cs ├── Program.cs ├── Properties │ ├── ServiceDependencies │ │ ├── SCManagement20230124114545 - Web Deploy │ │ │ └── profile.arm.json │ │ ├── SCManagement20230124114545 - Zip Deploy │ │ │ ├── mssql1.arm.json │ │ │ ├── profile.arm.json │ │ │ ├── secrets1.arm.json │ │ │ └── storage1.arm.json │ │ └── SCManagement20230124114545 - Zip Deploy1 │ │ │ └── profile.arm.json │ ├── launchSettings.json │ ├── serviceDependencies.SCManagement20230124114545 - Zip Deploy.json │ ├── serviceDependencies.json │ └── serviceDependencies.local.json ├── Resources │ ├── SharedResource.en-US.resx │ └── SharedResource.pt-PT.resx ├── SCManagement.csproj ├── Services │ ├── ApplicationContextService.cs │ ├── AzureStorageService │ │ ├── AzureStorage.cs │ │ ├── IAzureStorage.cs │ │ └── Models │ │ │ ├── BlobDto.cs │ │ │ └── BlobResponseDto.cs │ ├── BackgroundService │ │ ├── BackgroundHelperService.cs │ │ ├── BackgroundWorkerService.cs │ │ └── IBackgroundHelperService.cs │ ├── ClubService │ │ ├── ClubService.cs │ │ ├── IClubService.cs │ │ └── Models │ │ │ └── ClubSlots.cs │ ├── CronJobService │ │ ├── CronJobService.cs │ │ ├── DailyStatisticsGenerator.cs │ │ ├── DailySubscriptionChecker.cs │ │ ├── DailySubscriptionSuspender.cs │ │ └── HourlyEventCheckerRemover.cs │ ├── EmailService │ │ ├── AuthMessageSenderOptions.cs │ │ ├── EmailSenderMailgun.cs │ │ └── EmailSenderMailtrap.cs │ ├── EventService │ │ ├── EventService.cs │ │ └── IEventService.cs │ ├── IdentityErrors │ │ └── LocalizedIdentityErrorDescriber.cs │ ├── NotificationService │ │ ├── INotificationService.cs │ │ └── NotificationService.cs │ ├── PaymentService │ │ ├── IPaymentService.cs │ │ ├── Models │ │ │ ├── CardInfo.cs │ │ │ ├── EasypayConfigResponse.cs │ │ │ ├── EasypayResponse.cs │ │ │ ├── PayPayment.cs │ │ │ ├── Payment.cs │ │ │ ├── PaymentWebhook.cs │ │ │ ├── PaymentWebhookGeneric.cs │ │ │ ├── Product.cs │ │ │ ├── Subscription.cs │ │ │ └── UpgradePlan.cs │ │ └── PaymentService.cs │ ├── PlansService │ │ ├── IPlanService.cs │ │ ├── Models │ │ │ ├── Goal.cs │ │ │ ├── MealPlan.cs │ │ │ ├── MealPlanSession.cs │ │ │ ├── Plan.cs │ │ │ ├── TrainingPlan.cs │ │ │ └── TrainingPlanSession.cs │ │ └── PlanService.cs │ ├── RegisterServices.cs │ ├── SharedResourceService.cs │ ├── StatisticsService │ │ ├── IStatisticsService.cs │ │ ├── Models │ │ │ ├── BackofficeStats.cs │ │ │ ├── ClubCurrentUsers.cs │ │ │ ├── ClubGeneralInfo.cs │ │ │ ├── ClubModalityStatistics.cs │ │ │ ├── ClubPaymentStatistics.cs │ │ │ ├── ClubStatisticsAggregate.cs │ │ │ ├── ClubUserStatistics.cs │ │ │ ├── IClubStatistics.cs │ │ │ ├── ISystemStatistics.cs │ │ │ ├── StatisticsRange.cs │ │ │ ├── SystemPlansShortStatistics.cs │ │ │ ├── SystemPlansStatistics.cs │ │ │ └── SystemProductStatistics.cs │ │ └── StatisticsService.cs │ ├── TeamService │ │ ├── ITeamService.cs │ │ └── TeamService.cs │ ├── TranslationService │ │ ├── ITranslationService.cs │ │ └── TranslationService.cs │ └── UserService │ │ ├── IUserService.cs │ │ └── UserService.cs ├── SharedResource.cs ├── ViewComponents │ ├── CulturePickerViewComponent.cs │ └── UserClubContextViewComponent.cs ├── Views │ ├── Backoffice │ │ ├── Clubs.cshtml │ │ ├── CodesCreated.cshtml │ │ ├── CreateModality.cshtml │ │ ├── CreatePlan.cshtml │ │ ├── DelayedPayments.cshtml │ │ ├── EditPlan.cshtml │ │ ├── EditorTemplates │ │ │ └── ModalityTranslation.cshtml │ │ ├── Income.cshtml │ │ ├── Index.cshtml │ │ ├── ManagePlans.cshtml │ │ ├── Modalities.cshtml │ │ ├── Operations.cshtml │ │ ├── Subscription.cshtml │ │ └── UserAccess.cshtml │ ├── Clubs │ │ ├── Create.cshtml │ │ ├── Details.cshtml │ │ ├── Index.cshtml │ │ ├── Join.cshtml │ │ ├── Plans.cshtml │ │ ├── _PartialSearchClub.cshtml │ │ └── _PartnerPartial.cshtml │ ├── Events │ │ ├── Create.cshtml │ │ ├── Edit.cshtml │ │ ├── EditorTemplates │ │ │ └── EventTranslation.cshtml │ │ ├── EventDetails.cshtml │ │ ├── Index.cshtml │ │ ├── PathInfoMapBox.cshtml │ │ ├── Results.cshtml │ │ ├── UpdateEventLocation.cshtml │ │ └── _PartialAddResult.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Index.cshtml │ │ ├── Settings.cshtml │ │ └── TermsAndConditions.cshtml │ ├── MyClub │ │ ├── AthletesList.cshtml │ │ ├── Codes.cshtml │ │ ├── CreateTeam.cshtml │ │ ├── Edit.cshtml │ │ ├── EditTeam.cshtml │ │ ├── EditorTemplates │ │ │ └── ClubTranslations.cshtml │ │ ├── Index.cshtml │ │ ├── MyTeams.cshtml │ │ ├── PartnersList.cshtml │ │ ├── PaymentSettings.cshtml │ │ ├── PaymentsReceived.cshtml │ │ ├── StaffList.cshtml │ │ ├── TeamDetails.cshtml │ │ ├── TeamList.cshtml │ │ ├── Unavailable.cshtml │ │ ├── _PartialAddTeamAthletes.cshtml │ │ ├── _PartialCreateCode.cshtml │ │ ├── _PartialShowCode.cshtml │ │ └── _PartialUserDetails.cshtml │ ├── MyZone │ │ ├── CreateBioimpedance.cshtml │ │ ├── Index.cshtml │ │ └── UpdateBioimpedance.cshtml │ ├── Payment │ │ ├── Index.cshtml │ │ ├── _DetailsPartial.cshtml │ │ └── _PaymentPartial.cshtml │ ├── Plans │ │ ├── AthleteMealPlans.cshtml │ │ ├── AthleteTrainingPlans.cshtml │ │ ├── ChooseMealTeamTemplates.cshtml │ │ ├── ChooseMealTemplates.cshtml │ │ ├── ChooseTrainingTeamTemplates.cshtml │ │ ├── ChooseTrainingTemplates.cshtml │ │ ├── CreateGoal.cshtml │ │ ├── CreateMealPlan.cshtml │ │ ├── CreateMealPlanTemplate.cshtml │ │ ├── CreateTeamMealPlan.cshtml │ │ ├── CreateTeamTrainingPlan.cshtml │ │ ├── CreateTrainingPlan.cshtml │ │ ├── CreateTrainingPlanTemplate.cshtml │ │ ├── EditGoal.cshtml │ │ ├── EditMealPlan.cshtml │ │ ├── EditTrainingPlan.cshtml │ │ ├── EditorTemplates │ │ │ ├── MealPlanSession.cshtml │ │ │ └── TrainingPlanSession.cshtml │ │ ├── GoalDetails.cshtml │ │ ├── GoalsList.cshtml │ │ ├── MealDetails.cshtml │ │ ├── Templates.cshtml │ │ ├── TrainingDetails.cshtml │ │ └── TrainingZone.cshtml │ ├── Shared │ │ ├── Components │ │ │ ├── CulturePicker │ │ │ │ └── Default.cshtml │ │ │ └── UserClubContext │ │ │ │ └── UserClubRoles.cshtml │ │ ├── CustomError.cshtml │ │ ├── Error.cshtml │ │ ├── _AddressPartial.cshtml │ │ ├── _CustomErrorPartial.cshtml │ │ ├── _InfoPartial.cshtml │ │ ├── _Layout.cshtml │ │ ├── _LoginPartial.cshtml │ │ ├── _ValidationScriptsPartial.cshtml │ │ └── footer.cshtml │ ├── Statistics │ │ └── Index.cshtml │ ├── Subscription │ │ ├── Index.cshtml │ │ ├── _DetailsPartial.cshtml │ │ └── _PlansPartial.cshtml │ ├── User │ │ └── UpdateNotificationsSettings.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ ├── calendar.css │ ├── register_and_login.css │ └── site.css │ ├── favicon.ico │ ├── img │ ├── 917417-200.png │ ├── Andre.jpg │ ├── David.jpg │ ├── DeleteMap.png │ ├── Dinis.jpg │ ├── DrawMap.png │ ├── Func1.jpeg │ ├── Func2.jpeg │ ├── Func3.jpeg │ ├── Guilherme.png │ ├── Home-icon.svg.png │ ├── Map.png │ ├── NoClubBlack.png │ ├── NoClubWhite.png │ ├── Peralta.jpeg │ ├── SaveMap.png │ ├── Screenshot 2023-04-06 130437.png │ ├── SearchBarMap.png │ ├── SearchMap.png │ ├── Software.png │ ├── Software2.png │ ├── TutAddress.jpg │ ├── athelets.png │ ├── baseball_stadium.jpg │ ├── click.png │ ├── edit.png │ ├── icon.ico │ ├── img_381236.png │ ├── list.png │ ├── megafone.png │ ├── partners.png │ ├── paymentSettings.png │ ├── paymentsReceived.png │ ├── qr.png │ ├── staff-8.png │ ├── statistics.png │ ├── team-28.png │ ├── terms.png │ └── under-construction-png_667893.png │ ├── js │ ├── InitialConfigMapBox.js │ ├── Mapbox.js │ ├── PathMapBox.js │ ├── SearchMapBox.js │ ├── SearchMapBoxEvents.js │ ├── ShowPathMapBox.js │ ├── calendar.js │ └── site.js │ └── lib │ ├── DataTables │ ├── DataTables-1.13.3 │ │ ├── css │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.min.css │ │ │ ├── dataTables.bootstrap4.css │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ ├── dataTables.bootstrap5.css │ │ │ ├── dataTables.bootstrap5.min.css │ │ │ ├── dataTables.bulma.css │ │ │ ├── dataTables.bulma.min.css │ │ │ ├── dataTables.dataTables.css │ │ │ ├── dataTables.dataTables.min.css │ │ │ ├── dataTables.foundation.css │ │ │ ├── dataTables.foundation.min.css │ │ │ ├── dataTables.jqueryui.css │ │ │ ├── dataTables.jqueryui.min.css │ │ │ ├── dataTables.semanticui.css │ │ │ ├── dataTables.semanticui.min.css │ │ │ ├── jquery.dataTables.css │ │ │ └── jquery.dataTables.min.css │ │ ├── images │ │ │ ├── sort_asc.png │ │ │ ├── sort_asc_disabled.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ └── sort_desc_disabled.png │ │ └── js │ │ │ ├── dataTables.bootstrap.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ ├── dataTables.bootstrap4.js │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ ├── dataTables.bootstrap5.js │ │ │ ├── dataTables.bootstrap5.min.js │ │ │ ├── dataTables.bulma.js │ │ │ ├── dataTables.bulma.min.js │ │ │ ├── dataTables.dataTables.js │ │ │ ├── dataTables.dataTables.min.js │ │ │ ├── dataTables.foundation.js │ │ │ ├── dataTables.foundation.min.js │ │ │ ├── dataTables.jqueryui.js │ │ │ ├── dataTables.jqueryui.min.js │ │ │ ├── dataTables.semanticui.js │ │ │ ├── dataTables.semanticui.min.js │ │ │ ├── jquery.dataTables.js │ │ │ └── jquery.dataTables.min.js │ ├── Responsive-2.4.0 │ │ ├── css │ │ │ ├── responsive.bootstrap.css │ │ │ ├── responsive.bootstrap.min.css │ │ │ ├── responsive.bootstrap4.css │ │ │ ├── responsive.bootstrap4.min.css │ │ │ ├── responsive.bootstrap5.css │ │ │ ├── responsive.bootstrap5.min.css │ │ │ ├── responsive.bulma.css │ │ │ ├── responsive.bulma.min.css │ │ │ ├── responsive.dataTables.css │ │ │ ├── responsive.dataTables.min.css │ │ │ ├── responsive.foundation.css │ │ │ ├── responsive.foundation.min.css │ │ │ ├── responsive.jqueryui.css │ │ │ ├── responsive.jqueryui.min.css │ │ │ ├── responsive.semanticui.css │ │ │ └── responsive.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.responsive.js │ │ │ ├── dataTables.responsive.min.js │ │ │ ├── responsive.bootstrap.js │ │ │ ├── responsive.bootstrap.min.js │ │ │ ├── responsive.bootstrap4.js │ │ │ ├── responsive.bootstrap4.min.js │ │ │ ├── responsive.bootstrap5.js │ │ │ ├── responsive.bootstrap5.min.js │ │ │ ├── responsive.bulma.js │ │ │ ├── responsive.bulma.min.js │ │ │ ├── responsive.dataTables.js │ │ │ ├── responsive.dataTables.min.js │ │ │ ├── responsive.foundation.js │ │ │ ├── responsive.foundation.min.js │ │ │ ├── responsive.jqueryui.js │ │ │ ├── responsive.jqueryui.min.js │ │ │ ├── responsive.semanticui.js │ │ │ └── responsive.semanticui.min.js │ ├── RowReorder-1.3.2 │ │ ├── css │ │ │ ├── rowReorder.bootstrap.css │ │ │ ├── rowReorder.bootstrap.min.css │ │ │ ├── rowReorder.bootstrap4.css │ │ │ ├── rowReorder.bootstrap4.min.css │ │ │ ├── rowReorder.bootstrap5.css │ │ │ ├── rowReorder.bootstrap5.min.css │ │ │ ├── rowReorder.bulma.css │ │ │ ├── rowReorder.bulma.min.css │ │ │ ├── rowReorder.dataTables.css │ │ │ ├── rowReorder.dataTables.min.css │ │ │ ├── rowReorder.foundation.css │ │ │ ├── rowReorder.foundation.min.css │ │ │ ├── rowReorder.jqueryui.css │ │ │ ├── rowReorder.jqueryui.min.css │ │ │ ├── rowReorder.semanticui.css │ │ │ └── rowReorder.semanticui.min.css │ │ └── js │ │ │ ├── dataTables.rowReorder.js │ │ │ ├── dataTables.rowReorder.min.js │ │ │ ├── rowReorder.bootstrap.js │ │ │ ├── rowReorder.bootstrap.min.js │ │ │ ├── rowReorder.bootstrap4.js │ │ │ ├── rowReorder.bootstrap4.min.js │ │ │ ├── rowReorder.bootstrap5.js │ │ │ ├── rowReorder.bootstrap5.min.js │ │ │ ├── rowReorder.bulma.js │ │ │ ├── rowReorder.bulma.min.js │ │ │ ├── rowReorder.dataTables.js │ │ │ ├── rowReorder.dataTables.min.js │ │ │ ├── rowReorder.foundation.js │ │ │ ├── rowReorder.foundation.min.js │ │ │ ├── rowReorder.jqueryui.js │ │ │ ├── rowReorder.jqueryui.min.js │ │ │ ├── rowReorder.semanticui.js │ │ │ └── rowReorder.semanticui.min.js │ ├── datatables.css │ ├── datatables.js │ ├── datatables.min.css │ └── datatables.min.js │ ├── bootstrap │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-grid.css │ │ ├── bootstrap-grid.css.map │ │ ├── bootstrap-grid.min.css │ │ ├── bootstrap-grid.min.css.map │ │ ├── bootstrap-grid.rtl.css │ │ ├── bootstrap-grid.rtl.css.map │ │ ├── bootstrap-grid.rtl.min.css │ │ ├── bootstrap-grid.rtl.min.css.map │ │ ├── bootstrap-reboot.css │ │ ├── bootstrap-reboot.css.map │ │ ├── bootstrap-reboot.min.css │ │ ├── bootstrap-reboot.min.css.map │ │ ├── bootstrap-reboot.rtl.css │ │ ├── bootstrap-reboot.rtl.css.map │ │ ├── bootstrap-reboot.rtl.min.css │ │ ├── bootstrap-reboot.rtl.min.css.map │ │ ├── bootstrap-utilities.css │ │ ├── bootstrap-utilities.css.map │ │ ├── bootstrap-utilities.min.css │ │ ├── bootstrap-utilities.min.css.map │ │ ├── bootstrap-utilities.rtl.css │ │ ├── bootstrap-utilities.rtl.css.map │ │ ├── bootstrap-utilities.rtl.min.css │ │ ├── bootstrap-utilities.rtl.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ ├── bootstrap.min.css.map │ │ ├── bootstrap.rtl.css │ │ ├── bootstrap.rtl.css.map │ │ ├── bootstrap.rtl.min.css │ │ └── bootstrap.rtl.min.css.map │ │ └── js │ │ ├── bootstrap.bundle.js │ │ ├── bootstrap.bundle.js.map │ │ ├── bootstrap.bundle.min.js │ │ ├── bootstrap.bundle.min.js.map │ │ ├── bootstrap.esm.js │ │ ├── bootstrap.esm.js.map │ │ ├── bootstrap.esm.min.js │ │ ├── bootstrap.esm.min.js.map │ │ ├── bootstrap.js │ │ ├── bootstrap.js.map │ │ ├── bootstrap.min.js │ │ └── bootstrap.min.js.map │ ├── chosen_v1.8.7 │ ├── LICENSE.md │ ├── chosen-sprite.png │ ├── chosen-sprite@2x.png │ ├── chosen.css │ ├── chosen.jquery.js │ ├── chosen.jquery.min.js │ ├── chosen.min.css │ ├── chosen.proto.js │ ├── chosen.proto.min.js │ ├── composer.json │ ├── docsupport │ │ ├── chosen.png │ │ ├── init.js │ │ ├── init.proto.js │ │ ├── jquery-1.12.4.min.js │ │ ├── jquery-3.2.1.min.js │ │ ├── oss-credit.png │ │ ├── prism.css │ │ ├── prism.js │ │ ├── prototype-1.7.0.0.js │ │ └── style.css │ ├── index.html │ ├── index.proto.html │ └── options.html │ ├── fullcalendar-6.1.4 │ └── fullcalendar-6.1.4 │ │ ├── LICENSE.md │ │ ├── README.md │ │ ├── dist │ │ ├── index.global.js │ │ └── index.global.min.js │ │ └── examples │ │ ├── background-events.html │ │ ├── daygrid-views.html │ │ ├── external-dragging-2cals.html │ │ ├── external-dragging-builtin.html │ │ ├── full-height.html │ │ ├── list-sticky-header.html │ │ ├── list-views.html │ │ ├── month-view.html │ │ ├── multimonth-view.html │ │ ├── multiweek-view.html │ │ ├── natural-height.html │ │ ├── selectable.html │ │ └── timegrid-views.html │ ├── jquery-validation-unobtrusive │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ ├── jquery │ ├── LICENSE.txt │ └── dist │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ └── jquery.min.map │ └── qrcodejs │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── bower.json │ ├── index-svg.html │ ├── index.html │ ├── index.svg │ ├── jquery.min.js │ ├── qrcode.js │ └── qrcode.min.js ├── azure-pipelines.yml ├── db.env.parameters.json ├── db.json └── resources ├── arquitetura_geral.jpg └── diagrama_classes.jpg /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /SCManagement.AutomationTests/ClubTests.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement.AutomationTests/ClubTests.cs -------------------------------------------------------------------------------- /SCManagement.AutomationTests/SCManagement.AutomationTests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | false 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | all 22 | runtime; build; native; contentfiles; analyzers; buildtransitive 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /SCManagement.AutomationTests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using NUnit.Framework; -------------------------------------------------------------------------------- /SCManagement.Tests/Controller/HomeControllerTests.cs: -------------------------------------------------------------------------------- 1 | using FakeItEasy; 2 | using FluentAssertions; 3 | using Microsoft.AspNetCore.Http; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Logging; 6 | using SCManagement.Controllers; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace SCManagement.Tests.Controller 14 | { 15 | public class HomeControllerTests 16 | { 17 | private readonly HomeController _controller; 18 | private readonly ILogger _logger; 19 | 20 | public HomeControllerTests() 21 | { 22 | _logger = A.Fake>(); 23 | 24 | //SUT (system under test) 25 | _controller = new HomeController(_logger); 26 | } 27 | 28 | [Fact] 29 | public void HomeController_Index_ReturnsSuccess() 30 | { 31 | // Arrange 32 | 33 | // Act 34 | var result = _controller.Index(); 35 | 36 | // Assert 37 | result.Should().BeOfType(); 38 | } 39 | 40 | [Fact] 41 | public void HomeController_About_ReturnsSuccess() 42 | { 43 | // Arrange 44 | 45 | // Act 46 | var result = _controller.About(); 47 | 48 | // Assert 49 | result.Should().BeOfType(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /SCManagement.Tests/Controller/TranslationControllerTests.cs: -------------------------------------------------------------------------------- 1 | using FakeItEasy; 2 | using FluentAssertions; 3 | using SCManagement.Controllers; 4 | using SCManagement.Services.TranslationService; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | 11 | namespace SCManagement.Tests.Controller 12 | { 13 | public class TranslationControllerTests 14 | { 15 | private readonly ITranslationService _translationService; 16 | private readonly TranslationController _translationController; 17 | 18 | public TranslationControllerTests() 19 | { 20 | _translationService = A.Fake(); 21 | 22 | //SUT (system under test) 23 | _translationController = new TranslationController(_translationService); 24 | } 25 | 26 | 27 | [Fact] 28 | public async Task Translation() 29 | { 30 | 31 | // Arrange 32 | var list = new List 33 | { 34 | new TranslationsContainer 35 | { 36 | Translations = new Translation[1]{ new Translation() { Text = "Olá", To = "pt" } } 37 | } 38 | }; 39 | A.CallTo(() => _translationService.Translation(A._, A._, A._)).Returns(list); 40 | 41 | 42 | // Act 43 | var result = await _translationController.Translation("Hello", "en-US", "pt-PT"); 44 | 45 | // Assert 46 | result.Should().BeOfType>().And.NotBeNull(); 47 | 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /SCManagement.Tests/SCManagement.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | false 9 | 10 | fa8975d4-0bf1-481a-ad5d-f7d89de7dfba 11 | 12 | AnyCPU 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | runtime; build; native; contentfiles; analyzers; buildtransitive 28 | all 29 | 30 | 31 | runtime; build; native; contentfiles; analyzers; buildtransitive 32 | all 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /SCManagement.Tests/UnitTest1.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Tests 2 | { 3 | public class UnitTest1 4 | { 5 | [Fact] 6 | public void Test1() 7 | { 8 | 9 | } 10 | } 11 | } -------------------------------------------------------------------------------- /SCManagement.Tests/Usings.cs: -------------------------------------------------------------------------------- 1 | global using Xunit; -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/AccessDenied.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model AccessDeniedModel 3 | @{ 4 | ViewData["Title"] = "Access denied"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 |

You do not have access to this resource.

10 |
11 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/AccessDenied.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | 7 | namespace SCManagement.Areas.Identity.Pages.Account 8 | { 9 | /// 10 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 11 | /// directly from your code. This API may change or be removed in future releases. 12 | /// 13 | public class AccessDeniedModel : PageModel 14 | { 15 | /// 16 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 17 | /// directly from your code. This API may change or be removed in future releases. 18 | /// 19 | public void OnGet() 20 | { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/ConfirmEmail.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @using SCManagement 3 | @inject IStringLocalizer StringLocalizer 4 | @model ConfirmEmailModel 5 | @{ 6 | ViewData["Title"] = @StringLocalizer["Confirm email"]; 7 | } 8 | 9 | 10 | 11 |
12 | 13 |
18 | 19 |
20 |
26 |
27 |
28 |
29 |

@ViewData["Title"]

30 | 31 |
32 | 33 | 34 | 37 |
38 |
39 | 40 | 41 | 42 | 43 |
44 |
45 |
46 | 47 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/ConfirmEmailChange.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ConfirmEmailChangeModel 3 | @{ 4 | ViewData["Title"] = "Confirm email change"; 5 | } 6 | 7 |

@ViewData["Title"]

8 | 9 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @using SCManagement 3 | @inject IStringLocalizer StringLocalizer 4 | @model ForgotPasswordConfirmation 5 | @{ 6 | ViewData["Title"] = @StringLocalizer["Forgot password confirmation"]; 7 | } 8 | 9 | 10 | 11 |

@ViewData["Title"]

12 | 13 |
14 | 15 |
20 | 21 |
22 |
28 |
29 |
30 |
31 |

@ViewData["Title"]

32 |

@StringLocalizer["StatusMessage_VerificationEmail"]

33 |
34 |
35 |
36 |
37 |
38 |
39 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/ForgotPasswordConfirmation.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace SCManagement.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class ForgotPasswordConfirmation : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Logout.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model LogoutModel 3 | @{ 4 | ViewData["Title"] = "Log out"; 5 | } 6 | 7 |
8 |

@ViewData["Title"]

9 | @{ 10 | if (User.Identity.IsAuthenticated) 11 | { 12 |
13 | 14 |
15 | } 16 | else 17 | { 18 |

You have successfully logged out of the application.

19 | } 20 | } 21 |
22 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Logout.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using System; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNetCore.Authorization; 8 | using Microsoft.AspNetCore.Identity; 9 | using Microsoft.AspNetCore.Mvc; 10 | using Microsoft.AspNetCore.Mvc.RazorPages; 11 | using Microsoft.Extensions.Logging; 12 | using SCManagement.Models; 13 | 14 | namespace SCManagement.Areas.Identity.Pages.Account 15 | { 16 | public class LogoutModel : PageModel 17 | { 18 | private readonly SignInManager _signInManager; 19 | private readonly ILogger _logger; 20 | 21 | public LogoutModel(SignInManager signInManager, ILogger logger) 22 | { 23 | _signInManager = signInManager; 24 | _logger = logger; 25 | } 26 | 27 | public async Task OnPost(string returnUrl = null) 28 | { 29 | await _signInManager.SignOutAsync(); 30 | _logger.LogInformation("User logged out."); 31 | if (returnUrl != null) 32 | { 33 | return LocalRedirect(returnUrl); 34 | } 35 | else 36 | { 37 | // This needs to be a redirect so that the browser performs a new 38 | // request and the identity for the user gets updated. 39 | return RedirectToPage(); 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model PersonalDataModel 3 | @{ 4 | ViewData["Title"] = "Personal Data"; 5 | ViewData["ActivePage"] = ManageNavPages.PersonalData; 6 | } 7 | 8 |

@ViewData["Title"]

9 | 10 |
11 |
12 |

Your account contains personal data that you have given us. This page allows you to download or delete that data.

13 |

14 | Deleting this data will permanently remove your account, and this cannot be recovered. 15 |

16 |
17 | 18 |
19 |

20 | Delete 21 |

22 |
23 |
24 | 25 | @section Scripts { 26 | 27 | } 28 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/PersonalData.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | using System; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Identity; 6 | using Microsoft.AspNetCore.Mvc; 7 | using Microsoft.AspNetCore.Mvc.RazorPages; 8 | using Microsoft.Extensions.Logging; 9 | using SCManagement.Models; 10 | 11 | namespace SCManagement.Areas.Identity.Pages.Account.Manage 12 | { 13 | public class PersonalDataModel : PageModel 14 | { 15 | private readonly UserManager _userManager; 16 | private readonly ILogger _logger; 17 | 18 | public PersonalDataModel( 19 | UserManager userManager, 20 | ILogger logger) 21 | { 22 | _userManager = userManager; 23 | _logger = logger; 24 | } 25 | 26 | public async Task OnGet() 27 | { 28 | var user = await _userManager.GetUserAsync(User); 29 | if (user == null) 30 | { 31 | return NotFound($"Unable to load user with ID '{_userManager.GetUserId(User)}'."); 32 | } 33 | 34 | return Page(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/SetPassword.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model SetPasswordModel 3 | @{ 4 | ViewData["Title"] = "Set password"; 5 | ViewData["ActivePage"] = ManageNavPages.ChangePassword; 6 | } 7 | 8 |

Set your password

9 | 10 |

11 | You do not have a local username/password for this site. Add a local 12 | account so you can log in without an external login. 13 |

14 |
15 |
16 |
17 |
18 |
19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 |
28 | 29 |
30 |
31 |
32 | 33 | @section Scripts { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | if (ViewData.TryGetValue("ParentLayout", out var parentLayout)) 3 | { 4 | Layout = (string)parentLayout; 5 | } 6 | else 7 | { 8 | Layout = "/Areas/Identity/Pages/_Layout.cshtml"; 9 | } 10 | } 11 | 12 |
13 | @RenderBody() 14 |
15 | 16 | @section Scripts { 17 | @RenderSection("Scripts", required: false) 18 | } 19 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/_ManageNav.cshtml: -------------------------------------------------------------------------------- 1 | @inject SignInManager SignInManager 2 | @{ 3 | var hasExternalLogins = (await SignInManager.GetExternalAuthenticationSchemesAsync()).Any(); 4 | } 5 | 15 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/_StatusMessage.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @if (!String.IsNullOrEmpty(Model)) 4 | { 5 | var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; 6 | 10 | } 11 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/Manage/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SCManagement.Areas.Identity.Pages.Account.Manage -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @using SCManagement 3 | @inject IStringLocalizer StringLocalizer 4 | @model ResetPasswordConfirmationModel 5 | @{ 6 | ViewData["Title"] = @StringLocalizer["Reset password confirmation"]; 7 | } 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
20 | 21 |
22 |
28 |
29 |
30 |
31 |

@ViewData["Title"]

32 |

@StringLocalizer["Your password has been reset"]

33 |
34 | 35 | 38 |
39 |
40 |
41 |
42 |
43 | 44 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/ResetPasswordConfirmation.cshtml.cs: -------------------------------------------------------------------------------- 1 | // Licensed to the .NET Foundation under one or more agreements. 2 | // The .NET Foundation licenses this file to you under the MIT license. 3 | #nullable disable 4 | 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | 8 | namespace SCManagement.Areas.Identity.Pages.Account 9 | { 10 | /// 11 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 12 | /// directly from your code. This API may change or be removed in future releases. 13 | /// 14 | [AllowAnonymous] 15 | public class ResetPasswordConfirmationModel : PageModel 16 | { 17 | /// 18 | /// This API supports the ASP.NET Core Identity default UI infrastructure and is not intended to be used 19 | /// directly from your code. This API may change or be removed in future releases. 20 | /// 21 | public void OnGet() 22 | { 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/_StatusMessage.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | 3 | @if (!String.IsNullOrEmpty(Model)) 4 | { 5 | var statusMessageClass = Model.StartsWith("Error") ? "danger" : "success"; 6 | 10 | } 11 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/Account/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SCManagement.Areas.Identity.Pages.Account -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Identity 2 | @using SCManagement.Areas.Identity 3 | @using SCManagement.Areas.Identity.Pages 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | @using SCManagement.Models 6 | -------------------------------------------------------------------------------- /SCManagement/Areas/Identity/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /SCManagement/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using SCManagement.Models; 3 | using System.Diagnostics; 4 | 5 | namespace SCManagement.Controllers { 6 | public class HomeController : Controller { 7 | private readonly ILogger _logger; 8 | 9 | public HomeController(ILogger logger) 10 | { 11 | _logger = logger; 12 | } 13 | 14 | public IActionResult Index() 15 | { 16 | return View(); 17 | } 18 | 19 | public IActionResult About() 20 | { 21 | return View(); 22 | } 23 | 24 | public IActionResult TermsAndConditions() 25 | { 26 | return View(); 27 | } 28 | 29 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 30 | public IActionResult Error() 31 | { 32 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /SCManagement/Controllers/TranslationController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Authorization; 2 | using Microsoft.AspNetCore.Mvc; 3 | using SCManagement.Services.TranslationService; 4 | 5 | 6 | namespace SCManagement.Controllers 7 | { 8 | [Authorize] 9 | public class TranslationController : Controller 10 | { 11 | private readonly ITranslationService _translationService; 12 | 13 | /// 14 | /// Translations controller constructor, injects all the services needed 15 | /// 16 | /// 17 | public TranslationController(ITranslationService translationService) 18 | { 19 | _translationService = translationService; 20 | } 21 | 22 | 23 | /// 24 | /// Translate the content from a language to another 25 | /// 26 | /// 27 | /// 28 | /// 29 | /// 30 | [HttpPost] 31 | public async Task> Translation(string content, string fromLang, string toLang) 32 | { 33 | return await _translationService.Translation(content, fromLang, toLang); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230105175141_SelectedUserRole.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class SelectedUserRole : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.AddColumn( 12 | name: "Selected", 13 | table: "UsersRoleClub", 14 | type: "bit", 15 | nullable: false, 16 | defaultValue: false); 17 | } 18 | 19 | protected override void Down(MigrationBuilder migrationBuilder) 20 | { 21 | migrationBuilder.DropColumn( 22 | name: "Selected", 23 | table: "UsersRoleClub"); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230124113700_EMD.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class EMD : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.AddColumn( 12 | name: "EMDId", 13 | table: "AspNetUsers", 14 | type: "int", 15 | nullable: true); 16 | 17 | migrationBuilder.CreateIndex( 18 | name: "IX_AspNetUsers_EMDId", 19 | table: "AspNetUsers", 20 | column: "EMDId"); 21 | 22 | migrationBuilder.AddForeignKey( 23 | name: "FK_AspNetUsers_BlobDto_EMDId", 24 | table: "AspNetUsers", 25 | column: "EMDId", 26 | principalTable: "BlobDto", 27 | principalColumn: "Id"); 28 | } 29 | 30 | protected override void Down(MigrationBuilder migrationBuilder) 31 | { 32 | migrationBuilder.DropForeignKey( 33 | name: "FK_AspNetUsers_BlobDto_EMDId", 34 | table: "AspNetUsers"); 35 | 36 | migrationBuilder.DropIndex( 37 | name: "IX_AspNetUsers_EMDId", 38 | table: "AspNetUsers"); 39 | 40 | migrationBuilder.DropColumn( 41 | name: "EMDId", 42 | table: "AspNetUsers"); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230221172434_EventFix.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class EventFix : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.RenameColumn( 12 | name: "EnroolLimitDate", 13 | table: "Event", 14 | newName: "EnrollLimitDate"); 15 | 16 | migrationBuilder.AlterColumn( 17 | name: "Fee", 18 | table: "Event", 19 | type: "real", 20 | nullable: false, 21 | oldClrType: typeof(double), 22 | oldType: "float"); 23 | } 24 | 25 | protected override void Down(MigrationBuilder migrationBuilder) 26 | { 27 | migrationBuilder.RenameColumn( 28 | name: "EnrollLimitDate", 29 | table: "Event", 30 | newName: "EnroolLimitDate"); 31 | 32 | migrationBuilder.AlterColumn( 33 | name: "Fee", 34 | table: "Event", 35 | type: "float", 36 | nullable: false, 37 | oldClrType: typeof(float), 38 | oldType: "real"); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230224161147_ClubRoleStatus.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class ClubRoleStatus : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.AddColumn( 12 | name: "Status", 13 | table: "UsersRoleClub", 14 | type: "int", 15 | nullable: true); 16 | 17 | migrationBuilder.Sql("UPDATE UsersRoleClub SET Status = 1 WHERE Status IS NULL AND RoleId = 10"); 18 | } 19 | 20 | protected override void Down(MigrationBuilder migrationBuilder) 21 | { 22 | migrationBuilder.DropColumn( 23 | name: "Status", 24 | table: "UsersRoleClub"); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230224192104_TranslationFix.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class TranslationFix : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.DropColumn( 12 | name: "About", 13 | table: "Club"); 14 | 15 | migrationBuilder.DropColumn( 16 | name: "TermsAndConditions", 17 | table: "Club"); 18 | } 19 | 20 | protected override void Down(MigrationBuilder migrationBuilder) 21 | { 22 | migrationBuilder.AddColumn( 23 | name: "About", 24 | table: "Club", 25 | type: "nvarchar(max)", 26 | nullable: true); 27 | 28 | migrationBuilder.AddColumn( 29 | name: "TermsAndConditions", 30 | table: "Club", 31 | type: "nvarchar(max)", 32 | nullable: true); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230227171136_UpdateEvent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class UpdateEvent : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.AddColumn( 12 | name: "AddressByPath", 13 | table: "Event", 14 | type: "nvarchar(max)", 15 | nullable: true); 16 | } 17 | 18 | protected override void Down(MigrationBuilder migrationBuilder) 19 | { 20 | migrationBuilder.DropColumn( 21 | name: "AddressByPath", 22 | table: "Event"); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230310155703_BioImpedance.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | #nullable disable 5 | 6 | namespace SCManagement.Data.Migrations 7 | { 8 | public partial class BioImpedance : Migration 9 | { 10 | protected override void Up(MigrationBuilder migrationBuilder) 11 | { 12 | migrationBuilder.CreateTable( 13 | name: "Bioimpedance", 14 | columns: table => new 15 | { 16 | BioimpedanceId = table.Column(type: "nvarchar(450)", nullable: false), 17 | Weight = table.Column(type: "nvarchar(max)", nullable: true), 18 | Height = table.Column(type: "nvarchar(max)", nullable: true), 19 | FatMass = table.Column(type: "real", nullable: true), 20 | LeanMass = table.Column(type: "real", nullable: true), 21 | MuscleMass = table.Column(type: "real", nullable: true), 22 | ViceralFat = table.Column(type: "real", nullable: true), 23 | BasalMetabolism = table.Column(type: "real", nullable: true), 24 | Hydration = table.Column(type: "real", nullable: true), 25 | LastUpdateDate = table.Column(type: "datetime2", nullable: false) 26 | }, 27 | constraints: table => 28 | { 29 | table.PrimaryKey("PK_Bioimpedance", x => x.BioimpedanceId); 30 | }); 31 | } 32 | 33 | protected override void Down(MigrationBuilder migrationBuilder) 34 | { 35 | migrationBuilder.DropTable( 36 | name: "Bioimpedance"); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230313175936_EventsEdit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | #nullable disable 5 | 6 | namespace SCManagement.Data.Migrations 7 | { 8 | public partial class EventsEdit : Migration 9 | { 10 | protected override void Up(MigrationBuilder migrationBuilder) 11 | { 12 | migrationBuilder.AddColumn( 13 | name: "CreationDate", 14 | table: "Event", 15 | type: "datetime2", 16 | nullable: false, 17 | defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); 18 | } 19 | 20 | protected override void Down(MigrationBuilder migrationBuilder) 21 | { 22 | migrationBuilder.DropColumn( 23 | name: "CreationDate", 24 | table: "Event"); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SCManagement/Data/Migrations/20230323233807_GoalComplete.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | 3 | #nullable disable 4 | 5 | namespace SCManagement.Data.Migrations 6 | { 7 | public partial class GoalComplete : Migration 8 | { 9 | protected override void Up(MigrationBuilder migrationBuilder) 10 | { 11 | migrationBuilder.AddColumn( 12 | name: "isCompleted", 13 | table: "Goals", 14 | type: "bit", 15 | nullable: false, 16 | defaultValue: false); 17 | } 18 | 19 | protected override void Down(MigrationBuilder migrationBuilder) 20 | { 21 | migrationBuilder.DropColumn( 22 | name: "isCompleted", 23 | table: "Goals"); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SCManagement/Data/dataset/distritos.json: -------------------------------------------------------------------------------- 1 | [ 2 | "Aveiro", 3 | "Beja", 4 | "Braga", 5 | "Bragança", 6 | "Castelo Branco", 7 | "Coimbra", 8 | "Évora", 9 | "Faro", 10 | "Guarda", 11 | "Leiria", 12 | "Lisboa", 13 | "Portalegre", 14 | "Porto", 15 | "Santarém", 16 | "Setúbal", 17 | "Viana do Castelo", 18 | "Vila Real", 19 | "Viseu", 20 | "Ilha da Madeira", 21 | "Ilha de Porto Santo", 22 | "Ilha de Santa Maria", 23 | "Ilha de São Miguel", 24 | "Ilha Terceira", 25 | "Ilha Graciosa", 26 | "Ilha de São Jorge", 27 | "Ilha do Pico", 28 | "Ilha do Faial", 29 | "Ilha das Flores", 30 | "Ilha do Corvo" 31 | ] -------------------------------------------------------------------------------- /SCManagement/GlobalUsings.cs: -------------------------------------------------------------------------------- 1 | global using System.Globalization; 2 | global using Microsoft.Extensions.Localization; 3 | global using Microsoft.AspNetCore.Localization; 4 | global using Microsoft.AspNetCore.Mvc.Localization; 5 | -------------------------------------------------------------------------------- /SCManagement/Models/Address.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace SCManagement.Models 5 | { 6 | public class Address 7 | { 8 | public int Id { get; set; } 9 | public double CoordinateX { get; set; } 10 | public double CoordinateY { get; set; } 11 | public string AddressString { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SCManagement/Models/Bioimpedance.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace SCManagement.Models 5 | { 6 | public class Bioimpedance 7 | { 8 | public int Id { get; set; } 9 | public string UserId { get; set; } 10 | public User? User { get; set; } 11 | 12 | [Display(Name = "Height")] 13 | [RegularExpression("^((([1-9][0-9]{0,2})?'?([1-9][0-9]{0,2})(\"([1-9][0-9]{0,2})?|'')?)|([1-9][0-9]{0,2}((\\.|\\,)[0-9]{1,2})?(cm|m)))$", 14 | ErrorMessage = "Error_Bio_Height")] 15 | public string? Height { get; set; } 16 | 17 | [Display(Name = "Weight")] 18 | [RegularExpression("^([1-9][0-9]{0,2}((\\.|\\,)[0-9]{1,2})?(kg|lb|lbs))$", 19 | ErrorMessage = "Error_Bio_Weight")] 20 | public string? Weight { get; set; } 21 | 22 | [Display(Name = "FatMass")] 23 | [Range(0, 100)] 24 | public float? FatMass { get; set; } 25 | 26 | [Display(Name = "LeanMass")] 27 | [Range(0, 100)] 28 | public float? LeanMass { get; set; } 29 | 30 | [Display(Name = "MuscleMass")] 31 | [Range(0, 100)] 32 | public float? MuscleMass { get; set; } 33 | 34 | [Display(Name = "ViceralFat")] 35 | [Range(0, 60)] 36 | public float? ViceralFat { get; set; } 37 | 38 | [Display(Name = "BasalMetabolism")] 39 | public float? BasalMetabolism { get; set; } 40 | 41 | [Display(Name = "Hydration")] 42 | [Range(0, 100)] 43 | public float? Hydration { get; set; } 44 | 45 | public DateTime LastUpdateDate { get; set; } = DateTime.Now; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /SCManagement/Models/ClubPaymentSettings.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | using SCManagement.Services.PaymentService.Models; 4 | 5 | namespace SCManagement.Models 6 | { 7 | public class ClubPaymentSettings 8 | { 9 | [ForeignKey("Club")] 10 | public int ClubPaymentSettingsId { get; set; } 11 | 12 | public Club? Club { get; set; } 13 | 14 | [Display(Name = "Account Id")] 15 | public string? AccountId { get; set; } 16 | 17 | [Display(Name = "Account Key")] 18 | public string? AccountKey { get; set; } 19 | 20 | [Display(Name = "Valid Credentials")] 21 | public bool ValidCredentials { get; set; } = false; 22 | 23 | [Display(Name = "Notification Secret")] 24 | public string RequestSecret { get; set; } = Guid.NewGuid().ToString(); 25 | 26 | [Display(Name = "Quota Payment Frequency")] 27 | public SubscriptionFrequency QuotaFrequency { get; set; } = SubscriptionFrequency.Monthly; 28 | 29 | [Display(Name = "Quota Value")] 30 | [Range(0, 1000000)] 31 | public float QuotaFee { get; set; } = 0.0f; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /SCManagement/Models/ClubTranslations.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class ClubTranslations : ITranslation 4 | { 5 | public int Id { get; set; } 6 | 7 | public int ClubId { get; set; } 8 | 9 | public Club? Club { get; set; } 10 | 11 | public string? Language { get; set; } 12 | 13 | public string? Value { get; set; } 14 | 15 | public string? Atribute { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /SCManagement/Models/CodeClub.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace SCManagement.Models 5 | { 6 | [Index(nameof(Code), IsUnique = true)] 7 | public class CodeClub 8 | { 9 | public int Id { get; set; } 10 | 11 | [StringLength(10)] 12 | [Display(Name = "Code")] 13 | public string Code { get; set; } 14 | 15 | //little trick to make creation date automatically use the current date 16 | private DateTime? dateCreated = null; 17 | 18 | [DataType(DataType.Date)] 19 | [Display(Name = "Date Created")] 20 | public DateTime CreationDate 21 | { 22 | get 23 | { 24 | return dateCreated.HasValue 25 | ? dateCreated.Value 26 | : DateTime.Now; 27 | } 28 | 29 | set { dateCreated = value; } 30 | } 31 | [DataType(DataType.Date)] 32 | [Display(Name = "Date Expired")] 33 | public DateTime? ExpireDate { get; set; } 34 | [DataType(DataType.Date)] 35 | [Display(Name = "Date Used")] 36 | public DateTime? UsedDate { get; set; } 37 | 38 | [Display(Name = "Approved")] 39 | public bool Approved { get; set; } = true; 40 | 41 | public int ClubId { get; set; } 42 | [Display(Name = "Club")] 43 | public Club? Club { get; set; } 44 | public int RoleId { get; set; } 45 | [Display(Name = "Role")] 46 | public RoleClub? Role { get; set; } 47 | 48 | public string CreatedByUserId { get; set; } 49 | [Display(Name = "CreatedByUser")] 50 | public User? CreatedByUser { get; set; } 51 | public string? UsedByUserId { get; set; } 52 | [Display(Name = "UsedByUser")] 53 | public User? UsedByUser { get; set; } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /SCManagement/Models/Country.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class Country 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string NormalizedName { get; set; } 8 | public ICollection? Districts { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SCManagement/Models/County.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class County 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string NormalizedName { get; set; } 8 | public int DistrictId { get; set; } 9 | public District? District { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SCManagement/Models/District.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics.Metrics; 2 | 3 | namespace SCManagement.Models 4 | { 5 | public class District 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public string NormalizedName { get; set; } 10 | public int CountryId { get; set; } 11 | public Country? Country { get; set; } 12 | public ICollection? Counties { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SCManagement/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models { 2 | public class ErrorViewModel { 3 | public string? RequestId { get; set; } 4 | 5 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 6 | } 7 | } -------------------------------------------------------------------------------- /SCManagement/Models/EventEnroll.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class EventEnroll 4 | { 5 | public int Id { get; set; } 6 | public int EventId { get; set; } 7 | public Event? Event { get; set; } 8 | public string UserId { get; set; } 9 | public User? User { get; set; } 10 | public DateTime EnrollDate { get; set; } 11 | public EnrollPaymentStatus EnrollStatus { get; set; } 12 | 13 | } 14 | 15 | public enum EnrollPaymentStatus : int 16 | { 17 | Pending = 1, 18 | Valid = 2, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SCManagement/Models/EventResult.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class EventResult 4 | { 5 | public int Id { get; set; } 6 | public int? Position { get; set; } 7 | public double? Time { get; set; } 8 | public int? Score { get; set; } 9 | public string UserId { get; set; } 10 | public User? User { get; set; } 11 | public int EventId { get; set; } 12 | public Event? Event { get; set; } 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /SCManagement/Models/EventTranslation.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class EventTranslation : ITranslation 4 | { 5 | public int Id { get; set; } 6 | public int EventId { get; set; } 7 | public Event? Event { get; set; } 8 | public string? Language { get; set; } 9 | public string? Value { get; set; } 10 | public string? Atribute { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SCManagement/Models/ITranslation.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public interface ITranslation 4 | { 5 | public int Id { get; set; } 6 | 7 | public string? Language { get; set; } 8 | 9 | public string? Value { get; set; } 10 | 11 | public string? Atribute { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SCManagement/Models/Modality.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using SCManagement.Services.PlansService.Models; 3 | 4 | namespace SCManagement.Models 5 | { 6 | /// 7 | /// This class represents a Modality 8 | /// 9 | public class Modality 10 | { 11 | public int Id { get; set; } 12 | [NotMapped] 13 | public string? Name { get; set; } 14 | public ICollection? ModalityTranslations { get; set; } 15 | public ICollection? Clubs { get; set; } 16 | public ICollection? TrainingPlans { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SCManagement/Models/ModalityTranslation.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class ModalityTranslation : ITranslation 4 | { 5 | public int Id { get; set; } 6 | public int ModalityId { get; set; } 7 | public Modality? Modality { get; set; } 8 | public string? Language { get; set; } 9 | public string? Value { get; set; } 10 | public string? Atribute { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SCManagement/Models/Notification.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class Notification 4 | { 5 | public int Id { get; set; } 6 | public string UserId { get; set; } 7 | public User? User { get; set; } 8 | public bool IsEnabled { get; set; } 9 | public NotificationType Type { get; set; } 10 | } 11 | 12 | public enum NotificationType : int 13 | { 14 | Event_Created = 1, 15 | Event_Edited = 2, 16 | Event_Canceled = 3, 17 | Event_Joined = 4, 18 | Event_Left = 5, 19 | //missing 6, dont change 20 | Team_Added = 7, 21 | Team_Removed = 8, 22 | TrainingPlan_Assigned = 9, 23 | TrainingPlan_Deleted = 10, 24 | TrainingPlan_Edited = 11, 25 | MealPlan_Assigned = 12, 26 | MealPlan_Deleted = 13, 27 | MealPlan_Edited = 14, 28 | Goal_Assigned = 15, 29 | Goal_Deleted = 16, 30 | Goal_Edited = 17, 31 | Goal_Completed = 18, 32 | Plan_Discontinued = 19, 33 | Athletes_Number_Almost_Full = 20, 34 | Payment_Late = 21, 35 | Payment_Received = 22, 36 | Subscription_Started = 23, 37 | Subscription_Renewed = 24, 38 | Subscription_Expired = 25, 39 | Subscription_Canceled = 26, 40 | Club_Quota_Update = 27, 41 | Subscription_RenewTime = 28, 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /SCManagement/Models/RoleClub.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | /// 4 | /// This class represents a Role in a club 5 | /// 6 | public class RoleClub 7 | { 8 | public int Id { get; set; } 9 | 10 | public string RoleName { get; set; } 11 | 12 | public ICollection? UsersRoleClub { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SCManagement/Models/Team.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using Xunit.Abstractions; 3 | 4 | namespace SCManagement.Models 5 | { 6 | public class Team 7 | { 8 | public int Id { get; set; } 9 | [Required(ErrorMessage = "Error_Required")] 10 | [StringLength(40, ErrorMessage = "Error_Length", MinimumLength = 2)] 11 | [Display(Name = "Team Name")] 12 | public string Name { get; set; } 13 | [Display(Name = "Date Created")] 14 | public DateTime CreationDate 15 | { 16 | get 17 | { 18 | return dateCreated.HasValue 19 | ? dateCreated.Value 20 | : DateTime.Now; 21 | } 22 | 23 | set { dateCreated = value; } 24 | } 25 | 26 | 27 | private DateTime? dateCreated = null; 28 | [Display(Name = "Modality")] 29 | public int ModalityId { get; set; } 30 | [Display(Name = "Modalities")] 31 | public Modality? Modality { get; set; } 32 | 33 | public ICollection? Athletes { get; set; } 34 | 35 | public string TrainerId { get; set; } 36 | [Display(Name = "Trainer")] 37 | public User? Trainer { get; set; } 38 | public int ClubId { get; set; } 39 | public Club? Club { get; set; } 40 | } 41 | } 42 | 43 | 44 | -------------------------------------------------------------------------------- /SCManagement/Models/UserSettings.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Models 2 | { 3 | public class UserSettings 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SCManagement/Models/UsersRoleClub.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace SCManagement.Models 4 | { 5 | /// 6 | /// This class represents a User Role Club 7 | /// 8 | public class UsersRoleClub 9 | { 10 | public int Id { get; set; } 11 | 12 | public int ClubId { get; set; } 13 | [Display(Name = "Club")] 14 | public Club? Club { get; set; } 15 | 16 | public string UserId { get; set; } 17 | [Display(Name = "User")] 18 | public User? User { get; set; } 19 | 20 | public int RoleId { get; set; } 21 | 22 | [Display(Name = "Role")] 23 | public RoleClub? Role { get; set; } 24 | 25 | //little trick to make creation date automatically use the current date 26 | [Display(Name = "JoinDate")] 27 | public DateTime? JoinDate 28 | { 29 | get 30 | { 31 | return dateJoined.HasValue 32 | ? dateJoined.Value 33 | : DateTime.Now; 34 | } 35 | 36 | set { dateJoined = value; } 37 | } 38 | private DateTime? dateJoined = null; 39 | 40 | public bool Selected { get; set; } = false; 41 | 42 | public UserRoleStatus? Status { get; set; } 43 | } 44 | 45 | public enum UserRoleStatus : int 46 | { 47 | Active = 1, 48 | Pending_Payment = 2, 49 | Pending_Cancel = 3, 50 | Canceled = 4 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /SCManagement/Models/Validations/DateGreaterThanAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SCManagement.Services; 3 | 4 | namespace SCManagement.Models.Validations 5 | { 6 | public class DateGreaterThanAttribute : ValidationAttribute 7 | { 8 | public string Model { get; set; } 9 | private string GetErrorMessage(ValidationContext validationContext) 10 | { 11 | SharedResourceService errorTranslation = validationContext.GetService(typeof(SharedResourceService)) as SharedResourceService; 12 | return string.Format(errorTranslation.Get("Error_DateGreaterThan")); 13 | } 14 | 15 | protected override ValidationResult? IsValid(object value, ValidationContext validationContext) 16 | { 17 | if (value == null) 18 | return ValidationResult.Success; 19 | 20 | DateTime? startDate; 21 | if (Model.Equals("Goal")) 22 | { 23 | var obj = (Services.PlansService.Models.Goal)validationContext.ObjectInstance; 24 | startDate = obj.StartDate; 25 | } 26 | else if (Model.Equals("CreateTraining")) 27 | { 28 | var obj = (Controllers.PlansController.CreateTrainingPlanModel)validationContext.ObjectInstance; 29 | startDate = obj.StartDate; 30 | } 31 | else if (Model.Equals("CreateMeal")) 32 | { 33 | var obj = (Controllers.PlansController.CreateMealPlanModel)validationContext.ObjectInstance; 34 | startDate = obj.StartDate; 35 | } 36 | else 37 | { 38 | var obj = (Services.PlansService.Models.Plan)validationContext.ObjectInstance; 39 | startDate = obj.StartDate; 40 | } 41 | 42 | var val = (DateTime)value; 43 | 44 | if (val.Date <= startDate.Value.Date) 45 | return new ValidationResult(GetErrorMessage(validationContext)); 46 | 47 | return ValidationResult.Success; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /SCManagement/Models/Validations/DateOfBirthAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SCManagement.Services; 3 | 4 | namespace SCManagement.Models.Validations 5 | { 6 | public class DateOfBirthAttribute : ValidationAttribute 7 | { 8 | public int MinAge { get; set; } 9 | public int MaxAge { get; set; } 10 | 11 | private string GetErrorMessage(ValidationContext validationContext) 12 | { 13 | SharedResourceService errorTranslation = validationContext.GetService(typeof(SharedResourceService)) as SharedResourceService; 14 | return string.Format(errorTranslation.Get("Error_DateOfBirth"), MinAge, MaxAge); 15 | } 16 | 17 | protected override ValidationResult? IsValid(object value, ValidationContext validationContext) 18 | { 19 | if (value == null) 20 | return ValidationResult.Success; 21 | 22 | var val = (DateTime)value; 23 | 24 | if (val.AddYears(MinAge) > DateTime.Now) 25 | return new ValidationResult(GetErrorMessage(validationContext)); 26 | 27 | if (val.AddYears(MaxAge) < DateTime.Now) 28 | return new ValidationResult(GetErrorMessage(validationContext)); 29 | 30 | return ValidationResult.Success; 31 | 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SCManagement/Models/Validations/IsDateBeforeTodayAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SCManagement.Services; 3 | 4 | namespace SCManagement.Models.Validations 5 | { 6 | public class IsDateBeforeTodayAttribute : ValidationAttribute 7 | { 8 | private string GetErrorMessage(ValidationContext validationContext) 9 | { 10 | SharedResourceService errorTranslation = validationContext.GetService(typeof(SharedResourceService)) as SharedResourceService; 11 | return string.Format(errorTranslation.Get("Error_IsDateBeforeToday"), validationContext.DisplayName); 12 | } 13 | 14 | protected override ValidationResult? IsValid(object value, ValidationContext validationContext) 15 | { 16 | if (value == null) 17 | return ValidationResult.Success; 18 | 19 | var val = (DateTime)value; 20 | 21 | if (val < DateTime.Now.Date) 22 | return new ValidationResult(GetErrorMessage(validationContext)); 23 | 24 | return ValidationResult.Success; 25 | 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SCManagement/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:24921", 7 | "sslPort": 44336 8 | } 9 | }, 10 | "profiles": { 11 | "SCManagement": { 12 | "commandName": "Project", 13 | "dotnetRunMessages": true, 14 | "launchBrowser": true, 15 | "applicationUrl": "https://localhost:7111;http://localhost:5111", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "IIS Express": { 21 | "commandName": "IISExpress", 22 | "launchBrowser": true, 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | }, 28 | "hotReloadEnabled": true 29 | } 30 | -------------------------------------------------------------------------------- /SCManagement/Properties/serviceDependencies.SCManagement20230124114545 - Zip Deploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "secretStore": "AzureKeyVault", 5 | "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourcegroups/[parameters('resourceGroupName')]/providers/Microsoft.Sql/servers/scmanagementdbserver/databases/SCManagement_db", 6 | "type": "mssql.azure", 7 | "connectionId": "ConnectionStrings:DefaultConnection", 8 | "dynamicId": null 9 | }, 10 | "storage1": { 11 | "secretStore": "AzureKeyVault", 12 | "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.Storage/storageAccounts/cdnscmanagement", 13 | "type": "storage.azure", 14 | "connectionId": "BlobConnectionString", 15 | "dynamicId": null 16 | }, 17 | "secrets1": { 18 | "secretStore": "AzureAppSettings", 19 | "resourceId": "/subscriptions/[parameters('subscriptionId')]/resourceGroups/[parameters('resourceGroupName')]/providers/Microsoft.KeyVault/vaults/scmanagement", 20 | "type": "secrets.keyVault", 21 | "connectionId": "VaultUri", 22 | "dynamicId": null 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /SCManagement/Properties/serviceDependencies.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /SCManagement/Properties/serviceDependencies.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mssql1": { 4 | "type": "mssql.local", 5 | "connectionId": "ConnectionStrings:DefaultConnection" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /SCManagement/Services/ApplicationContextService.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services 4 | { 5 | public class ApplicationContextService 6 | { 7 | public string UserId { get; set; } 8 | public UsersRoleClub UserRole { get; set; } 9 | public ClubStatus ClubStatus { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SCManagement/Services/AzureStorageService/IAzureStorage.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Services.AzureStorageService.Models; 2 | 3 | namespace SCManagement.Services.AzureStorageService 4 | { 5 | public interface IAzureStorage 6 | { 7 | /// 8 | /// This method uploads a file submitted with the request 9 | /// 10 | /// File for upload 11 | /// Blob with status 12 | Task UploadAsync(IFormFile file); 13 | 14 | /// 15 | /// This method deleted a file with the specified filename 16 | /// 17 | /// File uuid 18 | /// Blob with status 19 | Task DeleteAsync(string FileUUID); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SCManagement/Services/AzureStorageService/Models/BlobDto.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace SCManagement.Services.AzureStorageService.Models 4 | { 5 | public class BlobDto 6 | { 7 | public int Id { get; set; } 8 | public string Uuid { get; set; } 9 | public string? OriginalName { get; set; } 10 | public string? ContentType { get; set; } 11 | public string? Uri { get; set; } 12 | [NotMapped] 13 | public Stream? Content { get; set; } 14 | public DateTime CreatedAt { get; } = new DateTime(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SCManagement/Services/AzureStorageService/Models/BlobResponseDto.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.AzureStorageService.Models 2 | { 3 | public class BlobResponseDto 4 | { 5 | public string? Status { get; set; } 6 | public bool Error { get; set; } 7 | public BlobDto Blob { get; set; } 8 | 9 | public BlobResponseDto() 10 | { 11 | Blob = new BlobDto(); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SCManagement/Services/BackgroundService/BackgroundHelperService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity.UI.Services; 2 | 3 | namespace SCManagement.Services.BackgroundService 4 | { 5 | public class BackgroundHelperService : IBackgroundHelperService 6 | { 7 | private readonly IEmailSender _emailSender; 8 | private readonly SharedResourceService _sharedResource; 9 | private readonly BackgroundWorkerService _backgroundWorker; 10 | 11 | /// 12 | /// Background helper service constructor 13 | /// 14 | /// 15 | /// 16 | /// 17 | public BackgroundHelperService(IEmailSender emailSender, SharedResourceService sharedResource, BackgroundWorkerService backgroundWorker) 18 | { 19 | _emailSender = emailSender; 20 | _sharedResource = sharedResource; 21 | _backgroundWorker = backgroundWorker; 22 | } 23 | 24 | 25 | /// 26 | /// Enqueues the email to be sent in the background 27 | /// 28 | /// 29 | /// 30 | /// 31 | /// 32 | public void SendEmail(string email, string lang, string EmailName, Dictionary values) 33 | { 34 | _backgroundWorker.Enqueue(async (_) => 35 | { 36 | if (email.Contains("scmanagement")) return; 37 | 38 | var emailBody = _sharedResource.Get($"Email_{EmailName}", lang); 39 | 40 | foreach (var entry in values) 41 | { 42 | emailBody = emailBody.Replace(entry.Key, entry.Value); 43 | } 44 | 45 | await _emailSender.SendEmailAsync(email, _sharedResource.Get($"Subject_{EmailName}", lang), emailBody); 46 | }); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /SCManagement/Services/BackgroundService/IBackgroundHelperService.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.BackgroundService 2 | { 3 | public interface IBackgroundHelperService 4 | { 5 | public void SendEmail(string email, string lang, string EmailName, Dictionary values); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SCManagement/Services/ClubService/Models/ClubSlots.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace SCManagement.Services.ClubService.Models 4 | { 5 | [NotMapped] 6 | public class ClubSlots 7 | { 8 | public int TotalSlots { get; set; } = 0; 9 | public int AvailableSlots { get; set; } = 0; 10 | public int UsedSlots { get; set; } = 0; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SCManagement/Services/EmailService/AuthMessageSenderOptions.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.EmailService 2 | { 3 | public class AuthMessageSenderOptions 4 | { 5 | public string? AuthKey { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /SCManagement/Services/EventService/IEventService.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services.EventService 4 | { 5 | public interface IEventService 6 | { 7 | public Task GetEvent(int eventId); 8 | public Task> GetEvents(string? userId); 9 | public Task CreateEvent(Event myEvent); 10 | public Task UpdateEvent(Event myEvent); 11 | public Task DeleteEvent(Event myEvent); 12 | public Task CreateEventEnroll(EventEnroll enroll); 13 | public Task GetEnroll(int eventId, string userId); 14 | public Task CancelEventEnroll(EventEnroll enroll); 15 | public Task GetNumberOfEnrolls(int eventId); 16 | public Task> GetEnrolls(int eventId); 17 | public Task
CreateEventAddress(Address address); 18 | public Task
UpdateEventAddress(int locationId, Address address); 19 | public Task RemoveEventAddress(Event myEvent); 20 | public Task CreateResult(EventResult result); 21 | public Task> GetResults(int eventId); 22 | public Task GetResult(string userId, int eventId); 23 | public Task DeleteResult(EventResult result); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SCManagement/Services/NotificationService/INotificationService.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | using SCManagement.Services.ClubService.Models; 3 | using SCManagement.Services.PaymentService.Models; 4 | using SCManagement.Services.PlansService.Models; 5 | 6 | namespace SCManagement.Services.NotificationService 7 | { 8 | public interface INotificationService 9 | { 10 | public void NotifyQuotaUpdate(int clubId, ClubPaymentSettings newValues); // 27 11 | public void NotifyPlansCreate(IEnumerable plans); // 9 and 12 12 | public void NotifyPlanEdit(Plan plan); // 11 and 14 13 | public void NotifyPlanDeleted(Plan plan); // 10 and 13 14 | public void NotifyGoalCreate(Goal goal); // 15 15 | public void NotifyGoalEdited(Goal goal); // 17 16 | public void NotifyGoalDeleted(Goal goal); // 16 17 | public void NotifyGoalCompleted(Goal goal); // 18 18 | public void NotifyTeamAdded(Team team, ICollection userIds); // 7 19 | public void NotifyTeam_Removed(Team team, string userIds); // 8 20 | public void NotifyEventCreate(Event eve); // 1 21 | public void NotifyEventEdit(Event eve); // 2 22 | public void NotifyEventDeleted(Event eve); // 3 23 | public void NotifyEventJoined(EventEnroll eventEnroll, bool needsPayment); // 4 24 | public void NotifyEventLeft(EventEnroll eventEnroll, bool missingPayment); // 5 25 | public void NotifyAthletesNumberAlmostFull(int clubId, ClubSlots slots); // 20 26 | public void NotifyPaymentLate(int payId); // 21 27 | public void NotifyPaymentReceived(int payId); // 22 28 | public void NotifySubscriptionStarted(int subId); // 23 29 | public void NotifySubscriptionRenewed(int subId); // 24 30 | public void NotifySubscriptionExpired(ICollection subIds); // 25 31 | public void NotifySubscriptionCanceled(Subscription subscription); // 26 32 | public void NotifyPlanDiscontinued(int productId); // 19 33 | public void NotifySubscriptionRenewTime(ICollection subIds); // 28 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/CardInfo.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.PaymentService.Models 2 | { 3 | public class CardInfo 4 | { 5 | public string LastFourDigits { get; set; } 6 | public string Type { get; set; } 7 | public string ExpirationDate { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/EasypayConfigResponse.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.PaymentService.Models 2 | { 3 | public class EasypayConfigResponse 4 | { 5 | public string? generic { get; set; } 6 | public string? account { get; set; } 7 | public List payment_methods { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/EasypayResponse.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.PaymentService.Models 2 | { 3 | public class EasypayResponse 4 | { 5 | public string status { get; set; } 6 | public List message { get; set; } 7 | public string id { get; set; } 8 | public Method method { get; set; } 9 | public string? payment_status { get; set; } 10 | } 11 | 12 | public class Method 13 | { 14 | public string type { get; set; } 15 | public string entity { get; set; } 16 | public string reference { get; set; } 17 | public string url { get; set; } 18 | public string last_four { get; set; } 19 | public string card_type { get; set; } 20 | public string expiration_date { get; set; } 21 | public string iban { get; set; } 22 | public string status { get; set; } 23 | public string alias { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/PayPayment.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace SCManagement.Services.PaymentService.Models 5 | { 6 | [NotMapped] 7 | public class PayPayment 8 | { 9 | public int Id { get; set; } 10 | [Required] 11 | public PaymentMethod PaymentMethod { get; set; } 12 | 13 | [Display(Name = "Phone number")] 14 | public string? PhoneNumber { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/PaymentWebhookGeneric.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.PaymentService.Models 2 | { 3 | public class PaymentWebhookGeneric 4 | { 5 | public string id { get; set; } 6 | public string key { get; set; } 7 | public string type { get; set; } 8 | public string status { get; set; } 9 | public string[]? messages { get; set; } 10 | public string? date { get; set; } 11 | 12 | public override string ToString() 13 | { 14 | return $"id: {id}, key: {key}, type: {type}, status: {status}, date: {date}"; 15 | } 16 | } 17 | } 18 | 19 | //generic 20 | //{ 21 | // "id": "1bbc14c3-8ca8-492c-887d-1ca86400e4fa", 22 | // "key": "Example Key", 23 | // "type": "capture", 24 | // "status": "success", 25 | // "messages": [ 26 | // "Your request was successfully created" 27 | // ], 28 | // "date": "2022-01-01 10:20:30" 29 | //} 30 | 31 | //payment 32 | //{ 33 | // "id": "21e1dc2d-dabe-4e33-b759-3b0606b80037", 34 | // "value": "10", 35 | // "currency": "EUR", 36 | // "key": "", 37 | // "expiration_time": "", 38 | // "method": "MB", 39 | // "customer": { 40 | // "id": "3676fb75-b074-4201-9a90-51fc1b3eb94f", 41 | // "name": "", 42 | // "email": "", 43 | // "phone": "", 44 | // "phone_indicative": "", 45 | // "fiscal_number": "", 46 | // "key": "" 47 | // }, 48 | // "account": { 49 | // "id": "" 50 | // }, 51 | // "transaction": { 52 | // "id": "8a50161a-d26e-43f6-b7c2-99a0255ada23", 53 | // "key": "", 54 | // "type": "capture", 55 | // "date": "2023-02-05T21:21:21Z", 56 | // "transfer_date": "2023-02-08T00:00:00Z", 57 | // "document_number": "BUSINE0712220465385820230205212041", 58 | // "values": { 59 | // "requested": "10", 60 | // "paid": "10", 61 | // "fixed_fee": "0.25", 62 | // "variable_fee": "0.15", 63 | // "tax": "0", 64 | // "transfer": "9.508" 65 | // } 66 | // } 67 | //} 68 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/Product.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SCManagement.Models; 3 | 4 | namespace SCManagement.Services.PaymentService.Models 5 | { 6 | public class Product 7 | { 8 | public int Id { get; set; } 9 | 10 | [Display(Name = "Name")] 11 | public string Name { get; set; } 12 | 13 | [Display(Name = "Value")] 14 | public float Value { get; set; } 15 | 16 | [Display(Name = "Product Type")] 17 | public ProductType ProductType { get; set; } 18 | 19 | public int? OriginalId { get; set; } 20 | 21 | public int? ClubId { get; set; } 22 | 23 | [Display(Name = "Club")] 24 | public Club? Club { get; set; } 25 | 26 | [Display(Name = "Is Subscription")] 27 | public bool IsSubscription { get; set; } = false; 28 | 29 | [Display(Name = "Subscription Frequency")] 30 | public SubscriptionFrequency? Frequency { get; set; } 31 | 32 | public bool Enabled { get; set; } = true; 33 | 34 | [Display(Name = "Athlete Slots")] 35 | public int? AthleteSlots { get; set; } 36 | } 37 | 38 | public enum ProductType : int 39 | { 40 | Event = 1, 41 | ClubMembership = 2, 42 | ClubSubscription = 3 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /SCManagement/Services/PaymentService/Models/UpgradePlan.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace SCManagement.Services.PaymentService.Models 4 | { 5 | public class UpgradePlan 6 | { 7 | [Required] 8 | public int SubscriptionId { get; set; } 9 | 10 | [Required] 11 | [Display(Name = "Plan")] 12 | public int PlanId { get; set; } 13 | 14 | [Display(Name = "Athletes")] 15 | public int? Athletes { get; set; } 16 | 17 | [Display(Name = "Plans")] 18 | public ICollection? Plans { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /SCManagement/Services/PlansService/Models/Goal.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SCManagement.Models; 3 | using SCManagement.Models.Validations; 4 | 5 | namespace SCManagement.Services.PlansService.Models 6 | { 7 | public class Goal 8 | { 9 | public int Id { get; set; } 10 | 11 | [Required(ErrorMessage = "Error_Required")] 12 | [StringLength(60, ErrorMessage = "Error_Length", MinimumLength = 2)] 13 | [Display(Name = "Goal Name")] 14 | public string Name { get; set; } 15 | 16 | [Required(ErrorMessage = "Error_Required")] 17 | [StringLength(300, ErrorMessage = "Error_Length", MinimumLength = 2)] 18 | [Display(Name = "Goal Description")] 19 | public string Description { get; set; } 20 | 21 | [DataType(DataType.Date)] 22 | [Display(Name = "Start Date")] 23 | public DateTime StartDate { get; set; } 24 | 25 | [DataType(DataType.Date)] 26 | [DateGreaterThan(Model = "Goal")] 27 | [Display(Name = "End Date")] 28 | public DateTime EndDate { get; set; } 29 | 30 | [Display(Name = "Trainer")] 31 | public User? Trainer { get; set; } 32 | public string TrainerId { get; set; } 33 | 34 | [Display(Name = "Athlete")] 35 | public User? Athlete { get; set; } 36 | public string AthleteId { get; set; } 37 | public bool isCompleted { get; set; } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /SCManagement/Services/PlansService/Models/MealPlan.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services.PlansService.Models 4 | { 5 | public class MealPlan : Plan 6 | { 7 | public ICollection? MealPlanSessions { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SCManagement/Services/PlansService/Models/MealPlanSession.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | 4 | namespace SCManagement.Services.PlansService.Models 5 | { 6 | public class MealPlanSession 7 | { 8 | public int Id { get; set; } 9 | public int MealPlanId { get; set; } 10 | public MealPlan? MealPlan { get; set; } 11 | 12 | [Required(ErrorMessage = "Error_Required")] 13 | [StringLength(60, ErrorMessage = "Error_Length", MinimumLength = 2)] 14 | [Display(Name = "Meal Name")] 15 | public string MealName { get; set; } 16 | 17 | [Required(ErrorMessage = "Error_Required")] 18 | [StringLength(300, ErrorMessage = "Error_Length", MinimumLength = 2)] 19 | [Display(Name = "Meal Description")] 20 | public string MealDescription { get; set; } 21 | 22 | [DataType(DataType.Time)] 23 | [Display(Name = "Time")] 24 | public TimeSpan Time { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SCManagement/Services/PlansService/Models/Plan.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel.DataAnnotations; 3 | using SCManagement.Models; 4 | using SCManagement.Models.Validations; 5 | 6 | namespace SCManagement.Services.PlansService.Models 7 | { 8 | public class Plan 9 | { 10 | public int Id { get; set; } 11 | 12 | [Required(ErrorMessage = "Error_Required")] 13 | [StringLength(60, ErrorMessage = "Error_Length", MinimumLength = 2)] 14 | [Display(Name = "Plan Name")] 15 | public string Name { get; set; } 16 | 17 | [Required(ErrorMessage = "Error_Required")] 18 | [StringLength(300, ErrorMessage = "Error_Length", MinimumLength = 2)] 19 | [Display(Name = "Plan Description")] 20 | public string Description { get; set; } 21 | 22 | [DataType(DataType.Date)] 23 | [Display(Name = "Start Date")] 24 | public DateTime? StartDate { get; set; } 25 | 26 | [DataType(DataType.Date)] 27 | [IsDateBeforeToday] 28 | [DateGreaterThan (Model = "Plan")] 29 | [Display(Name = "End Date")] 30 | public DateTime? EndDate { get; set; } 31 | 32 | [Display(Name = "Trainer")] 33 | public User? Trainer { get; set; } 34 | public string TrainerId { get; set; } 35 | 36 | [Display(Name = "Athlete")] 37 | public User? Athlete { get; set; } 38 | public string? AthleteId { get; set; } 39 | 40 | [Display(Name = "IsTemplate")] 41 | public bool IsTemplate { get; set; } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /SCManagement/Services/PlansService/Models/TrainingPlan.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | using SCManagement.Models.Validations; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using Xunit.Abstractions; 6 | 7 | namespace SCManagement.Services.PlansService.Models 8 | { 9 | public class TrainingPlan : Plan 10 | { 11 | [Display(Name = "Modality")] 12 | public Modality? Modality { get; set; } 13 | public int ModalityId { get; set; } 14 | public ICollection? TrainingPlanSessions { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SCManagement/Services/PlansService/Models/TrainingPlanSession.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace SCManagement.Services.PlansService.Models 4 | { 5 | public class TrainingPlanSession 6 | { 7 | public int Id { get; set; } 8 | public int TrainingPlanId { get; set; } 9 | public TrainingPlan? TrainingPlan { get; set; } 10 | 11 | [Required(ErrorMessage = "Error_Required")] 12 | [StringLength(60, ErrorMessage = "Error_Length", MinimumLength = 2)] 13 | [Display(Name = "Exercise Name")] 14 | public string ExerciseName { get; set; } 15 | 16 | [Required(ErrorMessage = "Error_Required")] 17 | [StringLength(300, ErrorMessage = "Error_Length", MinimumLength = 2)] 18 | [Display(Name = "Exercise Description")] 19 | public string ExerciseDescription { get; set; } 20 | 21 | [Range(1,1000, ErrorMessage = "Error_MaxNumber")] 22 | [Display(Name = "Repetitions")] 23 | public int? Repetitions { get; set; } 24 | 25 | //Duration is in minutes 26 | [Range(1, 1000, ErrorMessage = "Error_MaxNumber")] 27 | [Display(Name = "Duration")] 28 | public int? Duration { get; set; } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /SCManagement/Services/SharedResourceService.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using Microsoft.Extensions.Options; 3 | 4 | namespace SCManagement.Services 5 | { 6 | public class SharedResourceService 7 | { 8 | private readonly IStringLocalizer _localizer; 9 | public SharedResourceService(IStringLocalizerFactory factory) 10 | { 11 | var assemblyName = new AssemblyName(typeof(SharedResource).GetTypeInfo().Assembly.FullName!); 12 | _localizer = factory.Create(nameof(SharedResource), assemblyName.Name!); 13 | } 14 | 15 | public string Get(string key, string? culture = null) 16 | { 17 | if (culture == null) return _localizer[key]; 18 | 19 | var specifiedCulture = new CultureInfo(culture); 20 | CultureInfo.CurrentCulture = specifiedCulture; 21 | CultureInfo.CurrentUICulture = specifiedCulture; 22 | var options = Options.Create(new LocalizationOptions { ResourcesPath = "Resources" }); 23 | var factory = new ResourceManagerStringLocalizerFactory(options, new LoggerFactory()); 24 | var localizer = new StringLocalizer(factory); 25 | return localizer[key]; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/IStatisticsService.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | using SCManagement.Services.PaymentService.Models; 3 | using SCManagement.Services.StatisticsService.Models; 4 | 5 | namespace SCManagement.Services.StatisticsService 6 | { 7 | public interface IStatisticsService 8 | { 9 | public Task CreateClubUserStatistics(int clubId); 10 | public Task CreateClubPaymentStatistics(int clubId); 11 | public Task CreateClubModalityStatistics(int clubId); 12 | public Task> GetCurrentClubUsersStatistics(int clubId); 13 | public Task> GetClubPaymentStatistics(int clubId, int? year = null, int? month = null); 14 | public Task> GetClubPaymentDetailsStatistics(int clubId, int? year = null, int? month = null); 15 | public Task> GetClubUserStatistics(int clubId, int userTypeId, int? year = null, int? month = null); 16 | public Task> GetClubModalityStatistics(int clubId, int? year = null, int? month = null); 17 | public Task CreateSystemPaymentStatistics(); 18 | public Task CreateSystemPlansStatistics(); 19 | public Task> GetSystemPaymentStatistics(int? year = null); 20 | public Task> GetSystemPlansStatistics(int? year = null); 21 | public Task> GetSystemPlansShortStatistics(); 22 | public Task BestSellerPlan(); 23 | public Task GetActiveAndOtherClubsCount(); 24 | public Task> GetDelayedClubSubscriptions(); 25 | public Task GetActiveAndDelayedClubSubscriptionsCount(); 26 | public Task GetUsedAndCreatedCodes(); 27 | public Task GetMonthYearIncomeShort(); 28 | public Task> GetClubsGeneralStats(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/BackofficeStats.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using SCManagement.Services.PaymentService.Models; 3 | 4 | namespace SCManagement.Services.StatisticsService.Models 5 | { 6 | [NotMapped] 7 | public class BackofficeStats 8 | { 9 | public MinMaxHelper Clubs { get; set; } 10 | public MinMaxHelper Income { get; set; } 11 | public MinMaxHelper Codes { get; set; } 12 | public Product BestSeller { get; set; } 13 | public MinMaxHelper Payments { get; set; } 14 | } 15 | 16 | public class MinMaxHelper 17 | { 18 | public float Min { get; set; } = 0; 19 | public float Max { get; set; } = 0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ClubCurrentUsers.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace SCManagement.Services.StatisticsService.Models 4 | { 5 | [NotMapped] 6 | public class ClubCurrentUsers 7 | { 8 | public string RoleName { get; set; } 9 | public int Value { get; set; } 10 | public int? MaxValue { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ClubGeneralInfo.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using SCManagement.Models; 3 | 4 | namespace SCManagement.Services.StatisticsService.Models 5 | { 6 | [NotMapped] 7 | public class ClubGeneralInfo 8 | { 9 | public int Id { get; set; } 10 | public string Name { get; set; } 11 | public ClubStatus ClubStatus { get; set; } 12 | public string SubscriptionName { get; set; } 13 | public DateTime StartDate { get; set; } 14 | public int Members { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ClubModalityStatistics.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services.StatisticsService.Models 4 | { 5 | public class ClubModalityStatistics : IClubStatistics 6 | { 7 | public int Id { get; set; } 8 | public int Value { get; set; } 9 | 10 | public int ModalityId { get; set; } 11 | public Modality? Modality { get; set; } 12 | 13 | public int ClubId { get; set; } 14 | public Club? Club { get; set; } 15 | 16 | public StatisticsRange StatisticsRange { get; set; } 17 | public DateTime Timestamp { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ClubPaymentStatistics.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | using SCManagement.Services.PaymentService.Models; 3 | 4 | namespace SCManagement.Services.StatisticsService.Models 5 | { 6 | public class ClubPaymentStatistics : IClubStatistics 7 | { 8 | public int Id { get; set; } 9 | public float Value { get; set; } 10 | 11 | public int ClubId { get; set; } 12 | public Club? Club { get; set; } 13 | 14 | public int? ProductId { get; set; } 15 | public Product? Product { get; set; } 16 | 17 | public ProductType ProductType { get; set; } 18 | 19 | public StatisticsRange StatisticsRange { get; set; } 20 | public DateTime Timestamp { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ClubStatisticsAggregate.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace SCManagement.Services.StatisticsService.Models 4 | { 5 | [NotMapped] 6 | public class ClubStatisticsAggregate 7 | { 8 | public ICollection ClubCurrentUsers { get; set; } = new List(); 9 | public ICollection ClubPaymentStatistics { get; set; } = new List(); 10 | public ICollection ClubModalityStatistics { get; set; } = new List(); 11 | public ICollection ClubUserStatistics { get; set; } = new List(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ClubUserStatistics.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services.StatisticsService.Models 4 | { 5 | public class ClubUserStatistics : IClubStatistics 6 | { 7 | public int Id { get; set; } 8 | public int Value { get; set; } 9 | 10 | public int RoleId { get; set; } 11 | public RoleClub? Role { get; set; } 12 | 13 | public int ClubId { get; set; } 14 | public Club? Club { get; set; } 15 | 16 | public StatisticsRange StatisticsRange { get; set; } 17 | public DateTime Timestamp { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/IClubStatistics.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.ComponentModel.DataAnnotations.Schema; 3 | using SCManagement.Models; 4 | 5 | namespace SCManagement.Services.StatisticsService.Models 6 | { 7 | public interface IClubStatistics 8 | { 9 | public int Id { get; set; } 10 | 11 | public int ClubId { get; set; } 12 | public Club? Club { get; set; } 13 | 14 | public StatisticsRange StatisticsRange { get; set; } 15 | 16 | [DataType(DataType.Date)] 17 | public DateTime Timestamp { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/ISystemStatistics.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace SCManagement.Services.StatisticsService.Models 4 | { 5 | public interface ISystemStatistics 6 | { 7 | public int Id { get; set; } 8 | 9 | public StatisticsRange StatisticsRange { get; set; } 10 | 11 | [DataType(DataType.Date)] 12 | public DateTime Timestamp { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/StatisticsRange.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement.Services.StatisticsService.Models 2 | { 3 | public enum StatisticsRange : int 4 | { 5 | Year = 1, 6 | Month = 2, 7 | Week = 3, 8 | Day = 4, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/SystemPlansShortStatistics.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace SCManagement.Services.StatisticsService.Models 4 | { 5 | [NotMapped] 6 | public class SystemPlansShortStatistics 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public int Active { get; set; } 11 | public int Canceled { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/SystemPlansStatistics.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | using SCManagement.Services.PaymentService.Models; 3 | 4 | namespace SCManagement.Services.StatisticsService.Models 5 | { 6 | public class SystemPlansStatistics : ISystemStatistics 7 | { 8 | public int Id { get; set; } 9 | public int Active { get; set; } = 0; 10 | public int Canceled { get; set; } = 0; 11 | 12 | public int? ProductId { get; set; } 13 | public Product? Product { get; set; } 14 | 15 | public StatisticsRange StatisticsRange { get; set; } 16 | public DateTime Timestamp { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SCManagement/Services/StatisticsService/Models/SystemProductStatistics.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | using SCManagement.Services.PaymentService.Models; 3 | 4 | namespace SCManagement.Services.StatisticsService.Models 5 | { 6 | public class SystemPaymentStatistics : ISystemStatistics 7 | { 8 | public int Id { get; set; } 9 | public float Value { get; set; } 10 | 11 | public int? ProductId { get; set; } 12 | public Product? Product { get; set; } 13 | 14 | public ProductType ProductType { get; set; } 15 | 16 | public StatisticsRange StatisticsRange { get; set; } 17 | public DateTime Timestamp { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /SCManagement/Services/TeamService/ITeamService.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | using SCManagement.Models; 3 | 4 | namespace SCManagement.Services.TeamService 5 | { 6 | public interface ITeamService 7 | { 8 | public Task> GetTeams(int clubId); 9 | public Task GetTeam(int teamId); 10 | 11 | public Task CreateTeam(Team team); 12 | public Task UpdateTeam(Team team); 13 | public Task UpdateTeamAthletes(int teamId, IEnumerable atheltesId); 14 | 15 | public Task RemoveAthlete(Team team, User athlete); 16 | 17 | public Task DeleteTeam(Team team); 18 | 19 | public Task> GetTeamsByAthlete(string userId); 20 | public Task> GetTeamsByAthlete(string userId, int clubId); 21 | 22 | public Task> GetTeamsByTrainer(string userId); 23 | public Task TransferOwnerOfAllTeams(string trainerId, string AdminId); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /SCManagement/Services/TranslationService/ITranslationService.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services.TranslationService 4 | { 5 | public interface ITranslationService 6 | { 7 | public Task> Translation(string content, string fromLang, string toLang); 8 | 9 | public Task? Translate(IEnumerable translations); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SCManagement/Services/UserService/IUserService.cs: -------------------------------------------------------------------------------- 1 | using SCManagement.Models; 2 | 3 | namespace SCManagement.Services.UserService 4 | { 5 | public interface IUserService 6 | { 7 | public Task UpdateUser(User user); 8 | public Task GetUser(string userId); 9 | public Task GetUserWithRoles(string userId); 10 | public Task GetUserWithNotifications(string userId); 11 | public Task UpdateSelectedRole(string userId, int usersRoleClubId); 12 | public Task UpdateNotifications(ICollection userNotifications); 13 | public Task GetSelectedRole(string userId); 14 | public Task IsAtleteInAnyClub(string userId); 15 | public Task CreateBioimpedance(Bioimpedance bioimpedance); 16 | public Task> GetBioimpedances(string userId); 17 | public Task GetLastBioimpedance(string userId); 18 | public Task UpdateBioimpedance(Bioimpedance bioimpedance); 19 | public Task GetUserWithEMD(string userId); 20 | public Task CheckAndDeleteEMD(User user); 21 | public Task IsStaffInAnyClub(string userId); 22 | public Task IsTrainerInAnyClub(string userId); 23 | public Task> GetAllUsers(); 24 | public Task UserIsAdmin(string userId); 25 | public Task ChangeSystemUserRole(string userId, string newRole); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /SCManagement/SharedResource.cs: -------------------------------------------------------------------------------- 1 | namespace SCManagement 2 | { 3 | public class SharedResource 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /SCManagement/ViewComponents/CulturePickerViewComponent.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Identity; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.Extensions.Options; 4 | using SCManagement.Models; 5 | 6 | namespace SCManagement.ViewComponents 7 | { 8 | public class CulturePicker : ViewComponent 9 | { 10 | private readonly IOptions _localizationOptions; 11 | 12 | 13 | public CulturePicker( 14 | IOptions localizationOptions) 15 | { 16 | _localizationOptions = localizationOptions; 17 | } 18 | 19 | 20 | public IViewComponentResult Invoke() 21 | { 22 | var cultureFeature = HttpContext.Features.Get(); 23 | var model = new CulturePickerModel 24 | { 25 | SupportedCultures = _localizationOptions.Value.SupportedUICultures.ToList(), 26 | CurrentUICulture = cultureFeature.RequestCulture.UICulture 27 | }; 28 | return View(model); 29 | } 30 | } 31 | 32 | public class CulturePickerModel 33 | { 34 | public CultureInfo CurrentUICulture { get; set; } 35 | public List SupportedCultures { get; set; } 36 | 37 | public string ToFlagEmoji(string country) 38 | { 39 | country = country.Split('-').LastOrDefault(); 40 | 41 | if (country == null) 42 | return "⁉️️"; 43 | 44 | return string.Concat( 45 | country 46 | .ToUpper() 47 | .Select(x => char.ConvertFromUtf32(x + 0x1F1A5)) 48 | ); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /SCManagement/Views/Backoffice/CodesCreated.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | @{ 4 | ViewData["Title"] = "Codes Created"; 5 | } 6 | -------------------------------------------------------------------------------- /SCManagement/Views/Backoffice/CreateModality.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Models.Modality 2 | @inject IStringLocalizer StringLocalizer 3 | 4 | @{ 5 | ViewData["Title"] = @StringLocalizer["CreateModality"]; 6 | } 7 | 8 |
9 |

@StringLocalizer["CreateModality"]

10 |
11 |
12 |
13 |
14 |
15 | @if (ViewBag.Error != null) 16 | { 17 |
@(ViewBag.Error)
18 | } 19 | @Html.EditorFor(x => x.ModalityTranslations) 20 |
21 | 25 |
26 |
27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /SCManagement/Views/Backoffice/EditorTemplates/ModalityTranslation.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Models.ModalityTranslation 2 | @inject IStringLocalizer StringLocalizer 3 | 4 | @{ 5 | ViewData["Title"] = "ModalityTranslation"; 6 | } 7 | 8 | @StringLocalizer["ModalityName"] @Model.Language 9 | 10 |
11 | 12 | @Html.HiddenFor(x => x.Id) 13 | @Html.HiddenFor(x => x.Language) 14 | @Html.HiddenFor(x => x.Atribute) 15 |
16 | -------------------------------------------------------------------------------- /SCManagement/Views/Clubs/_PartialSearchClub.cshtml: -------------------------------------------------------------------------------- 1 | @model IEnumerable 2 | @inject IStringLocalizer StringLocalizer 3 | 4 | 9 | @foreach (var item in Model) 10 | { 11 |
16 |
17 |
18 |

19 | @Html.DisplayFor(modelItem => item.Name) 20 |

21 |

24 | @Html.DisplayFor(modelItem => item.ClubTranslations.FirstOrDefault(c => c.Atribute == "About").Value) 25 |

26 | 29 |
30 |
31 | 32 |
33 |
34 |
35 | } 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /SCManagement/Views/Clubs/_PartnerPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ClubPaymentSettings 2 | @inject IStringLocalizer StringLocalizer 3 | 4 |
5 |
6 |
7 |
8 |
9 | @Html.DisplayNameFor(model => model.QuotaFee) 10 |
11 |
12 | @Html.DisplayFor(model => model.QuotaFee) 13 |
14 | 15 |
16 | @Html.DisplayNameFor(model => model.QuotaFrequency) 17 |
18 |
19 | @Html.DisplayFor(model => model.QuotaFrequency) 20 |
21 |
22 | 23 | @if (ViewBag.AlreadyPartner == true) 24 | { 25 |
@StringLocalizer["You are already a partner of this club"]
26 | } 27 | else if (ViewBag.IsClubMember == true) 28 | { 29 |
@StringLocalizer["You are already part of the club with a role"]
30 | } 31 | else 32 | { 33 |
34 |
35 | 36 |
37 | 38 |
39 |
40 | } 41 |
42 | 43 | -------------------------------------------------------------------------------- /SCManagement/Views/Events/EditorTemplates/EventTranslation.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Models.EventTranslation 2 | 3 |
4 | 5 | @Html.HiddenFor(x => x.Id) 6 | @Html.HiddenFor(x => x.Language) 7 | @Html.HiddenFor(x => x.Atribute) 8 |
9 | -------------------------------------------------------------------------------- /SCManagement/Views/Home/Settings.cshtml: -------------------------------------------------------------------------------- 1 | @inject IStringLocalizer StringLocalizer 2 | @{ 3 | ViewData["Title"] = @StringLocalizer["Settings"]; 4 | } 5 | 6 |
7 |

@StringLocalizer["Notifications"]

8 |
9 |
10 |
11 |
@StringLocalizer["General"]
12 |
13 | 17 |
18 |
19 |
20 |
21 |
@StringLocalizer["Events"]
22 |
23 | 27 |
28 |
29 |
30 |
31 |
@StringLocalizer["Payments"]
32 |
33 | 37 |
38 |
39 |
40 |
41 |
42 | -------------------------------------------------------------------------------- /SCManagement/Views/MyClub/EditorTemplates/ClubTranslations.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Models.ClubTranslations 2 | 3 | 4 | 5 |
6 | 7 | @Html.HiddenFor(x => x.Id) 8 | @Html.HiddenFor(x => x.Language) 9 | @Html.HiddenFor(x => x.Atribute) 10 |
-------------------------------------------------------------------------------- /SCManagement/Views/MyClub/Unavailable.cshtml: -------------------------------------------------------------------------------- 1 | @inject IStringLocalizer StringLocalizer 2 | @model Club; 3 | 4 | @{ 5 | ViewData["Title"] = @StringLocalizer["Unavailable"]; 6 | } 7 | 8 |
9 |

@StringLocalizer["Welcomeclub"] @Model.Name

10 | @if (ViewBag.RoleId >= 40) 11 | { 12 |
13 |

@StringLocalizer["ClubUnavailableTitle"] @StringLocalizer[Model.Status.ToString()].

14 |

@StringLocalizer["ClubUnavailableDescriptionPrivate"]

15 |
16 | } 17 | else 18 | { 19 |
20 |

21 | @StringLocalizer["ClubUnavailableTitle"] @StringLocalizer["Unavailable"].Value.ToLower(). 22 |

23 |

@StringLocalizer["ClubUnavailableDescriptionPublic"]

24 |
25 | } 26 |
27 | 28 | -------------------------------------------------------------------------------- /SCManagement/Views/MyClub/_PartialCreateCode.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Controllers.MyClubController.CreateCodeModel 2 | @inject IStringLocalizer StringLocalizer 3 | 4 |
5 |
6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 |
21 |
22 |
23 |
24 | 25 | @section Scripts { 26 | @{ 27 | await Html.RenderPartialAsync("_ValidationScriptsPartial"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /SCManagement/Views/Plans/EditorTemplates/MealPlanSession.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Services.PlansService.Models.MealPlanSession 2 | @inject IStringLocalizer StringLocalizer 3 | @{ 4 | string guid = Guid.NewGuid().ToString(); 5 | } 6 | 7 |
8 |
9 | @Html.HiddenFor(x => x.Id) 10 | @Html.HiddenFor(x => x.MealPlanId) 11 |
12 |
13 | 14 | 15 | 16 |
17 |
18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 | 29 |
30 | 31 |
32 |
33 | 34 | -------------------------------------------------------------------------------- /SCManagement/Views/Plans/EditorTemplates/TrainingPlanSession.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Services.PlansService.Models.TrainingPlanSession 2 | @inject IStringLocalizer StringLocalizer 3 | 4 | @{ 5 | string guid = Guid.NewGuid().ToString(); 6 | } 7 | 8 |
9 |
10 | @Html.HiddenFor(x => x.Id) 11 | @Html.HiddenFor(x => x.TrainingPlanId) 12 |
13 |
14 | 15 | 16 | 17 |
18 |
19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 |
37 |
38 | 39 | 45 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/Components/CulturePicker/Default.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.ViewComponents.CulturePickerModel 2 |
3 |
4 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/Components/UserClubContext/UserClubRoles.cshtml: -------------------------------------------------------------------------------- 1 | @inject IStringLocalizer StringLocalizer 2 | 3 | 4 | 5 | @if (ViewBag.Roles != null) 6 | { 7 |
8 | @StringLocalizer["Club Selected"]: 9 |
10 | 11 |
12 |
13 | } 14 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/CustomError.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | @inject IStringLocalizer StringLocalizer 3 | 4 | @{ 5 | ViewData["Title"] = @StringLocalizer[$"{Model}_Title"]; 6 | } 7 | 8 |
9 |

@ViewData["Title"]

10 |

@StringLocalizer[Model]

11 |
12 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/_AddressPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Models.Address 2 | 3 | 4 | @{ 5 | ViewData["Title"] = "Address"; 6 | } 7 | 8 |
9 | @*
10 | 11 | 12 |
*@ 13 | @*
14 | 15 | 16 |
*@ 17 | @*
18 | 19 | 20 |
*@ 21 | 22 | @await Component.InvokeAsync("Address", Model) 23 | 24 | @section Scripts { 25 | @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} 26 | } 27 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/_CustomErrorPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 | @inject IStringLocalizer StringLocalizer 3 | 4 | @{ 5 | ViewData["Title"] = @StringLocalizer[$"{Model}_Title"]; 6 | } 7 | 8 |
9 |

@ViewData["Title"]

10 |

@StringLocalizer[Model]

11 |
12 | -------------------------------------------------------------------------------- /SCManagement/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /SCManagement/Views/Subscription/_PlansPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model SCManagement.Services.PaymentService.Models.UpgradePlan 2 | 3 |
4 |
5 |
6 | 7 | 8 |

Plans

9 |
10 | 11 |
12 | @foreach (var plan in Model.Plans) 13 | { 14 |
15 | 16 | 17 |
18 | } 19 | 20 |
21 | 22 |
23 | 24 |
25 |
26 |
27 | 28 | -------------------------------------------------------------------------------- /SCManagement/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using SCManagement 2 | @using SCManagement.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /SCManagement/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /SCManagement/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SCManagement/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=SCManagement;Trusted_Connection=True;MultipleActiveResultSets=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "AllowedHosts": "*", 12 | "KeyVaultUri": "https://scmanagement.vault.azure.net/", 13 | "BlobConnectionString": "", 14 | "BlobContainerName": "", 15 | "CdnUrl": "", 16 | "TranslatorAPIKey": "", 17 | "TranslatorLocation": "", 18 | "TranslatorAPIEndpoint": "" 19 | } 20 | -------------------------------------------------------------------------------- /SCManagement/wwwroot/css/register_and_login.css: -------------------------------------------------------------------------------- 1 | .signup { 2 | border-radius: 10px; 3 | margin-left: 20px; 4 | padding: 5px 25px 5px 25px; 5 | background-color: #00639A; 6 | border-color: #00639A; 7 | } 8 | 9 | .signup:hover { 10 | color: #00639A; 11 | background-color: white !important; 12 | border-color: #00639A; 13 | } 14 | -------------------------------------------------------------------------------- /SCManagement/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/favicon.ico -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/917417-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/917417-200.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Andre.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Andre.jpg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/David.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/David.jpg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/DeleteMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/DeleteMap.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Dinis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Dinis.jpg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/DrawMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/DrawMap.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Func1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Func1.jpeg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Func2.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Func2.jpeg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Func3.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Func3.jpeg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Guilherme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Guilherme.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Home-icon.svg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Home-icon.svg.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Map.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/NoClubBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/NoClubBlack.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/NoClubWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/NoClubWhite.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Peralta.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Peralta.jpeg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/SaveMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/SaveMap.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Screenshot 2023-04-06 130437.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Screenshot 2023-04-06 130437.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/SearchBarMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/SearchBarMap.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/SearchMap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/SearchMap.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Software.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/Software2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/Software2.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/TutAddress.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/TutAddress.jpg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/athelets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/athelets.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/baseball_stadium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/baseball_stadium.jpg -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/click.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/click.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/edit.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/icon.ico -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/img_381236.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/img_381236.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/list.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/megafone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/megafone.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/partners.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/partners.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/paymentSettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/paymentSettings.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/paymentsReceived.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/paymentsReceived.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/qr.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/staff-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/staff-8.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/statistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/statistics.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/team-28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/team-28.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/terms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/terms.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/img/under-construction-png_667893.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/img/under-construction-png_667893.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/css/dataTables.dataTables.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/css/dataTables.dataTables.css -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/css/dataTables.dataTables.min.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/css/dataTables.dataTables.min.css -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_asc.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_both.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_desc.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Dinip/SCManagement/cd8d12f63f057ef67d4c6fe99dc40b627bb6914f/SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/js/dataTables.dataTables.js: -------------------------------------------------------------------------------- 1 | /*! DataTables styling integration 2 | * ©2018 SpryMedia Ltd - datatables.net/license 3 | */ 4 | 5 | (function( factory ){ 6 | if ( typeof define === 'function' && define.amd ) { 7 | // AMD 8 | define( ['jquery', 'datatables.net'], function ( $ ) { 9 | return factory( $, window, document ); 10 | } ); 11 | } 12 | else if ( typeof exports === 'object' ) { 13 | // CommonJS 14 | module.exports = function (root, $) { 15 | if ( ! root ) { 16 | // CommonJS environments without a window global must pass a 17 | // root. This will give an error otherwise 18 | root = window; 19 | } 20 | 21 | if ( ! $ ) { 22 | $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window 23 | require('jquery') : 24 | require('jquery')( root ); 25 | } 26 | 27 | if ( ! $.fn.dataTable ) { 28 | require('datatables.net')(root, $); 29 | } 30 | 31 | return factory( $, root, root.document ); 32 | }; 33 | } 34 | else { 35 | // Browser 36 | factory( jQuery, window, document ); 37 | } 38 | }(function( $, window, document, undefined ) { 39 | 'use strict'; 40 | var DataTable = $.fn.dataTable; 41 | 42 | 43 | 44 | 45 | 46 | return DataTable; 47 | })); 48 | -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/js/dataTables.dataTables.min.js: -------------------------------------------------------------------------------- 1 | /*! DataTables styling integration 2 | * ©2018 SpryMedia Ltd - datatables.net/license 3 | */ 4 | !function(t){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return t(e,window,document)}):"object"==typeof exports?module.exports=function(e,n){return e=e||window,(n=n||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net")(e,n),t(n,0,e.document)}:t(jQuery,window,document)}(function(e,n,t,u){"use strict";return e.fn.dataTable}); -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/DataTables-1.13.3/js/dataTables.jqueryui.min.js: -------------------------------------------------------------------------------- 1 | /*! DataTables jQuery UI integration 2 | * ©2011-2014 SpryMedia Ltd - datatables.net/license 3 | */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return a(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e=e||window,(t=t||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net")(e,t),a(t,0,e.document)}:a(jQuery,window,document)}(function(e,t,a,u){"use strict";var i=e.fn.dataTable,n="fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix ui-corner-";return e.extend(!0,i.defaults,{dom:'<"'+n+'tl ui-corner-tr"lfr>t<"'+n+'bl ui-corner-br"ip>'}),e.extend(i.ext.classes,{sWrapper:"dataTables_wrapper dt-jqueryui",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"ui-state-disabled",sPageButtonDisabled:"ui-state-disabled",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sHeaderTH:"ui-state-default",sFooterTH:"ui-state-default"}),i}); -------------------------------------------------------------------------------- /SCManagement/wwwroot/lib/DataTables/Responsive-2.4.0/js/responsive.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! Bootstrap integration for DataTables' Responsive 2 | * © SpryMedia Ltd - datatables.net/license 3 | */ 4 | !function(a){"function"==typeof define&&define.amd?define(["jquery","datatables.net-bs","datatables.net-responsive"],function(e){return a(e,window,document)}):"object"==typeof exports?module.exports=function(e,d){return e=e||window,(d=d||("undefined"!=typeof window?require("jquery"):require("jquery")(e))).fn.dataTable||require("datatables.net-bs")(e,d),d.fn.dataTable||require("datatables.net-responsive")(e,d),a(d,0,e.document)}:a(jQuery,window,document)}(function(i,e,d,a){"use strict";var n=i.fn.dataTable,t=n.Responsive.display,s=t.modal,l=i('