init
This commit is contained in:
commit
fa8609d2fa
|
@ -0,0 +1 @@
|
|||
**/wwwroot/libs/** linguist-vendored
|
|
@ -0,0 +1,265 @@
|
|||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# Admin
|
||||
src/Sinet.Universal.Admin.Web/Logs/*
|
||||
src/Sinet.Universal.Admin.Web.Host/Logs/*
|
||||
src/Sinet.Universal.Admin.AuthServer/Logs/*
|
||||
src/Sinet.Universal.Admin.HttpApi.Host/Logs/*
|
||||
src/Sinet.Universal.Admin.HttpApi.Host/Logs/*
|
||||
src/Sinet.Universal.Admin.DbMigrator/Logs/*
|
||||
src/Sinet.Universal.Admin.Blazor.Server/Logs/*
|
||||
src/Sinet.Universal.Admin.Blazor.Server.Tiered/Logs/*
|
||||
|
||||
# Use abp install-libs to restore.
|
||||
**/wwwroot/libs/*
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"singleQuote": true,
|
||||
"useTabs": false,
|
||||
"tabWidth": 4
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
</packageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,41 @@
|
|||
# Sinet.Universal.Admin
|
||||
|
||||
## About this solution
|
||||
|
||||
This is a layered startup solution based on [Domain Driven Design (DDD)](https://docs.abp.io/en/abp/latest/Domain-Driven-Design) practises. All the fundamental ABP modules are already installed.
|
||||
|
||||
### Pre-requirements
|
||||
|
||||
* [.NET 7.0+ SDK](https://dotnet.microsoft.com/download/dotnet)
|
||||
* [Node v18 or 20](https://nodejs.org/en)
|
||||
|
||||
### Configurations
|
||||
|
||||
The solution comes with a default configuration that works out of the box. However, you may consider to change the following configuration before running your solution:
|
||||
|
||||
* Check the `ConnectionStrings` in `appsettings.json` files under the `Sinet.Universal.Admin.HttpApi.Host` and `Sinet.Universal.Admin.DbMigrator` projects and change it if you need.
|
||||
|
||||
### Before running the application
|
||||
|
||||
* Run `abp install-libs` command on your solution folder to install client-side package dependencies. This step is automatically done when you create a new solution with ABP CLI. However, you should run it yourself if you have first cloned this solution from your source control, or added a new client-side package dependency to your solution.
|
||||
* Run `Sinet.Universal.Admin.DbMigrator` to create the initial database. This should be done in the first run. It is also needed if a new database migration is added to the solution later.
|
||||
|
||||
### Solution structure
|
||||
|
||||
This is a layered monolith application that consists of the following applications:
|
||||
|
||||
* `Sinet.Universal.Admin.DbMigrator`: A console application which applies the migrations and also seeds the initial data. It is useful on development as well as on production environment.
|
||||
* `Sinet.Universal.Admin.HttpApi.Host`: ASP.NET Core API application that is used to expose the APIs to the clients.
|
||||
* `Sinet.Universal.Admin.Blazor`: ASP.NET Core Blazor Server application that is the essential web application of the solution.
|
||||
|
||||
## Deploying the application
|
||||
|
||||
Deploying an ABP application is not different than deploying any .NET or ASP.NET Core application. However, there are some topics that you should care about when you are deploying your applications. You can check ABP's [Deployment documentation](https://docs.abp.io/en/abp/latest/Deployment/Index) before deploying your application.
|
||||
|
||||
### Additional resources
|
||||
|
||||
You can see the following resources to learn more about your solution and the ABP Framework:
|
||||
|
||||
* [Web Application Development Tutorial](https://docs.abp.io/en/abp/latest/Tutorials/Part-1)
|
||||
* [Application Startup Template Structure](https://docs.abp.io/en/abp/latest/Startup-Templates/Application)
|
||||
* [LeptonX Lite Blazor UI](https://docs.abp.io/en/abp/latest/Themes/LeptonXLite/Blazor?UI=Blazor)
|
|
@ -0,0 +1,160 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34227.203
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Domain", "src\server\Sinet.Universal.Admin.Domain\Sinet.Universal.Admin.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Application", "src\server\Sinet.Universal.Admin.Application\Sinet.Universal.Admin.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.EntityFrameworkCore", "src\server\Sinet.Universal.Admin.EntityFrameworkCore\Sinet.Universal.Admin.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Application.Tests", "test\Sinet.Universal.Admin.Application.Tests\Sinet.Universal.Admin.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Domain.Shared", "src\common\Sinet.Universal.Admin.Domain.Shared\Sinet.Universal.Admin.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Application.Contracts", "src\common\Sinet.Universal.Admin.Application.Contracts\Sinet.Universal.Admin.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.HttpApi", "src\common\Sinet.Universal.Admin.HttpApi\Sinet.Universal.Admin.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.HttpApi.Client", "src\common\Sinet.Universal.Admin.HttpApi.Client\Sinet.Universal.Admin.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.EntityFrameworkCore.Tests", "test\Sinet.Universal.Admin.EntityFrameworkCore.Tests\Sinet.Universal.Admin.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.TestBase", "test\Sinet.Universal.Admin.TestBase\Sinet.Universal.Admin.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Domain.Tests", "test\Sinet.Universal.Admin.Domain.Tests\Sinet.Universal.Admin.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.HttpApi.Client.ConsoleTestApp", "test\Sinet.Universal.Admin.HttpApi.Client.ConsoleTestApp\Sinet.Universal.Admin.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.DbMigrator", "src\server\Sinet.Universal.Admin.DbMigrator\Sinet.Universal.Admin.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.HttpApi.Host", "src\server\Sinet.Universal.Admin.HttpApi.Host\Sinet.Universal.Admin.HttpApi.Host.csproj", "{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Blazor", "src\client\Sinet.Universal.Admin.Blazor\Sinet.Universal.Admin.Blazor.csproj", "{27B2DDC7-8B75-4322-A312-25419C15D9D8}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{3BF71760-5526-4089-8A43-ED8430847906}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "server", "server", "{CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{15E62D85-34D1-44EE-9C43-AD3CC8D8558D}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Server.Host", "src\server\Sinet.Universal.Admin.Server.Host\Sinet.Universal.Admin.Server.Host.csproj", "{CEBD131C-0B70-4BBF-99C5-47E2EB415554}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.RCL", "src\common\Sinet.Universal.Admin.RCL\Sinet.Universal.Admin.RCL.csproj", "{9EC53C30-FD0C-4DA2-958F-A7F5E277CE7C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sinet.Universal.Admin.Web", "src\client\Sinet.Universal.Admin.Web\Sinet.Universal.Admin.Web.csproj", "{6C032DF5-C957-468F-A4C9-CA8167508DEF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{27B2DDC7-8B75-4322-A312-25419C15D9D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{27B2DDC7-8B75-4322-A312-25419C15D9D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{27B2DDC7-8B75-4322-A312-25419C15D9D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{27B2DDC7-8B75-4322-A312-25419C15D9D8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CEBD131C-0B70-4BBF-99C5-47E2EB415554}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CEBD131C-0B70-4BBF-99C5-47E2EB415554}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CEBD131C-0B70-4BBF-99C5-47E2EB415554}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CEBD131C-0B70-4BBF-99C5-47E2EB415554}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9EC53C30-FD0C-4DA2-958F-A7F5E277CE7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9EC53C30-FD0C-4DA2-958F-A7F5E277CE7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9EC53C30-FD0C-4DA2-958F-A7F5E277CE7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9EC53C30-FD0C-4DA2-958F-A7F5E277CE7C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6C032DF5-C957-468F-A4C9-CA8167508DEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6C032DF5-C957-468F-A4C9-CA8167508DEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6C032DF5-C957-468F-A4C9-CA8167508DEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6C032DF5-C957-468F-A4C9-CA8167508DEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}
|
||||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}
|
||||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}
|
||||
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {3BF71760-5526-4089-8A43-ED8430847906}
|
||||
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {3BF71760-5526-4089-8A43-ED8430847906}
|
||||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {3BF71760-5526-4089-8A43-ED8430847906}
|
||||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {3BF71760-5526-4089-8A43-ED8430847906}
|
||||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
|
||||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}
|
||||
{748584B1-BA69-4F6A-81AA-F4BDE6BCE29D} = {CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}
|
||||
{27B2DDC7-8B75-4322-A312-25419C15D9D8} = {15E62D85-34D1-44EE-9C43-AD3CC8D8558D}
|
||||
{3BF71760-5526-4089-8A43-ED8430847906} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||
{CA3CC1A0-79B8-4B7B-8180-9A355B3856F7} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||
{15E62D85-34D1-44EE-9C43-AD3CC8D8558D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
|
||||
{CEBD131C-0B70-4BBF-99C5-47E2EB415554} = {CA3CC1A0-79B8-4B7B-8180-9A355B3856F7}
|
||||
{9EC53C30-FD0C-4DA2-958F-A7F5E277CE7C} = {3BF71760-5526-4089-8A43-ED8430847906}
|
||||
{6C032DF5-C957-468F-A4C9-CA8167508DEF} = {15E62D85-34D1-44EE-9C43-AD3CC8D8558D}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,23 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
|
||||
</wpf:ResourceDictionary>
|
|
@ -0,0 +1,19 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Version>1.0.0</Version>
|
||||
<NoWarn>$(NoWarn);CS1591</NoWarn>
|
||||
<AbpProjectType>app</AbpProjectType>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
|
||||
<PropertyGroup>
|
||||
<NoWarn>$(NoWarn);0436</NoWarn>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,11 @@
|
|||
using AutoMapper;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor;
|
||||
|
||||
public class AdminBlazorAutoMapperProfile : Profile
|
||||
{
|
||||
public AdminBlazorAutoMapperProfile()
|
||||
{
|
||||
//Define your AutoMapper configuration here for the Blazor project.
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using System.Net.Http;
|
||||
using Blazorise.Bootstrap5;
|
||||
using Blazorise.Icons.FontAwesome;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Sinet.Universal.Admin.Blazor.Menus;
|
||||
using OpenIddict.Abstractions;
|
||||
using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme;
|
||||
using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite;
|
||||
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
|
||||
using Volo.Abp.Autofac.WebAssembly;
|
||||
using Volo.Abp.AutoMapper;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.UI.Navigation;
|
||||
using Volo.Abp.Identity.Blazor.WebAssembly;
|
||||
using Volo.Abp.SettingManagement.Blazor.WebAssembly;
|
||||
using Volo.Abp.TenantManagement.Blazor.WebAssembly;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor;
|
||||
|
||||
[DependsOn(
|
||||
typeof(AbpAutofacWebAssemblyModule),
|
||||
typeof(AdminHttpApiClientModule),
|
||||
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeModule),
|
||||
typeof(AbpIdentityBlazorWebAssemblyModule),
|
||||
typeof(AbpTenantManagementBlazorWebAssemblyModule),
|
||||
typeof(AbpSettingManagementBlazorWebAssemblyModule)
|
||||
)]
|
||||
public class AdminBlazorModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
|
||||
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();
|
||||
|
||||
ConfigureAuthentication(builder);
|
||||
ConfigureHttpClient(context, environment);
|
||||
ConfigureBlazorise(context);
|
||||
ConfigureRouter(context);
|
||||
ConfigureUI(builder);
|
||||
ConfigureMenu(context);
|
||||
ConfigureAutoMapper(context);
|
||||
}
|
||||
|
||||
private void ConfigureRouter(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpRouterOptions>(options =>
|
||||
{
|
||||
options.AppAssembly = typeof(AdminBlazorModule).Assembly;
|
||||
});
|
||||
}
|
||||
|
||||
private void ConfigureMenu(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpNavigationOptions>(options =>
|
||||
{
|
||||
options.MenuContributors.Add(new AdminMenuContributor(context.Services.GetConfiguration()));
|
||||
});
|
||||
}
|
||||
|
||||
private void ConfigureBlazorise(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services
|
||||
.AddBootstrap5Providers()
|
||||
.AddFontAwesomeIcons();
|
||||
}
|
||||
|
||||
private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
|
||||
{
|
||||
builder.Services.AddOidcAuthentication(options =>
|
||||
{
|
||||
builder.Configuration.Bind("AuthServer", options.ProviderOptions);
|
||||
options.UserOptions.NameClaim = OpenIddictConstants.Claims.Name;
|
||||
options.UserOptions.RoleClaim = OpenIddictConstants.Claims.Role;
|
||||
|
||||
options.ProviderOptions.DefaultScopes.Add("Admin");
|
||||
options.ProviderOptions.DefaultScopes.Add("roles");
|
||||
options.ProviderOptions.DefaultScopes.Add("email");
|
||||
options.ProviderOptions.DefaultScopes.Add("phone");
|
||||
});
|
||||
}
|
||||
|
||||
private static void ConfigureUI(WebAssemblyHostBuilder builder)
|
||||
{
|
||||
builder.RootComponents.Add<App>("#ApplicationContainer");
|
||||
|
||||
}
|
||||
|
||||
private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
|
||||
{
|
||||
context.Services.AddTransient(sp => new HttpClient
|
||||
{
|
||||
BaseAddress = new Uri(environment.BaseAddress)
|
||||
});
|
||||
}
|
||||
|
||||
private void ConfigureAutoMapper(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<AdminBlazorModule>();
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using Volo.Abp.DependencyInjection;
|
||||
using Volo.Abp.Ui.Branding;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor;
|
||||
|
||||
[Dependency(ReplaceServices = true)]
|
||||
public class AdminBrandingProvider : DefaultBrandingProvider
|
||||
{
|
||||
public override string AppName => "Admin";
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
using Volo.Abp.Bundling;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor;
|
||||
|
||||
/* Add your global styles/scripts here.
|
||||
* See https://docs.abp.io/en/abp/latest/UI/Blazor/Global-Scripts-Styles to learn how to use it
|
||||
*/
|
||||
public class AdminBundleContributor : IBundleContributor
|
||||
{
|
||||
public void AddScripts(BundleContext context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddStyles(BundleContext context)
|
||||
{
|
||||
context.Add("main.css", true);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using Sinet.Universal.Admin.Localization;
|
||||
using Volo.Abp.AspNetCore.Components;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor;
|
||||
|
||||
public abstract class AdminComponentBase : AbpComponentBase
|
||||
{
|
||||
protected AdminComponentBase()
|
||||
{
|
||||
LocalizationResource = typeof(AdminResource);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Sinet.Universal.Admin.Localization;
|
||||
using Sinet.Universal.Admin.MultiTenancy;
|
||||
using Volo.Abp.Account.Localization;
|
||||
using Volo.Abp.Authorization.Permissions;
|
||||
using Volo.Abp.Identity.Blazor;
|
||||
using Volo.Abp.SettingManagement.Blazor.Menus;
|
||||
using Volo.Abp.TenantManagement.Blazor.Navigation;
|
||||
using Volo.Abp.UI.Navigation;
|
||||
using Volo.Abp.Users;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor.Menus;
|
||||
|
||||
public class AdminMenuContributor : IMenuContributor
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
public AdminMenuContributor(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
|
||||
{
|
||||
if (context.Menu.Name == StandardMenus.Main)
|
||||
{
|
||||
await ConfigureMainMenuAsync(context);
|
||||
}
|
||||
else if (context.Menu.Name == StandardMenus.User)
|
||||
{
|
||||
await ConfigureUserMenuAsync(context);
|
||||
}
|
||||
}
|
||||
|
||||
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
|
||||
{
|
||||
var l = context.GetLocalizer<AdminResource>();
|
||||
|
||||
context.Menu.Items.Insert(
|
||||
0,
|
||||
new ApplicationMenuItem(
|
||||
AdminMenus.Home,
|
||||
l["Menu:Home"],
|
||||
"/",
|
||||
icon: "fas fa-home"
|
||||
)
|
||||
);
|
||||
|
||||
var administration = context.Menu.GetAdministration();
|
||||
|
||||
if (MultiTenancyConsts.IsEnabled)
|
||||
{
|
||||
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
|
||||
}
|
||||
|
||||
administration.SetSubItemOrder(IdentityMenuNames.GroupName, 2);
|
||||
administration.SetSubItemOrder(SettingManagementMenus.GroupName, 3);
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
|
||||
{
|
||||
var accountStringLocalizer = context.GetLocalizer<AccountResource>();
|
||||
|
||||
var authServerUrl = _configuration["AuthServer:Authority"] ?? "";
|
||||
|
||||
context.Menu.AddItem(new ApplicationMenuItem(
|
||||
"Account.Manage",
|
||||
accountStringLocalizer["MyAccount"],
|
||||
$"{authServerUrl.EnsureEndsWith('/')}Account/Manage?returnUrl={_configuration["App:SelfUrl"]}",
|
||||
icon: "fa fa-cog",
|
||||
order: 1000,
|
||||
null).RequireAuthenticated());
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace Sinet.Universal.Admin.Blazor.Menus;
|
||||
|
||||
public class AdminMenus
|
||||
{
|
||||
private const string Prefix = "Admin";
|
||||
public const string Home = Prefix + ".Home";
|
||||
|
||||
//Add your menu items here...
|
||||
|
||||
}
|
|
@ -0,0 +1,179 @@
|
|||
@page "/"
|
||||
@using Volo.Abp.MultiTenancy
|
||||
@inherits AdminComponentBase
|
||||
@inject AuthenticationStateProvider AuthenticationStateProvider
|
||||
<div class="container">
|
||||
<div class="p-5 text-center">
|
||||
<Badge Color="Color.Success" class="mb-4">
|
||||
<h5 class="m-1"> <i class="fas fa-rocket"></i> Congratulations, <strong>Admin</strong> is successfully running!</h5>
|
||||
</Badge>
|
||||
|
||||
<h1>Welcome to the Application</h1>
|
||||
|
||||
<p class="lead px-lg-5 mx-lg-5">@L["LongWelcomeMessage"]</p>
|
||||
|
||||
@if ( !CurrentUser.IsAuthenticated )
|
||||
{
|
||||
<a class="btn btn-primary" href="/authentication/login">
|
||||
<i class="fa fa-sign-in-alt"></i> @L["Login"]
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-auto text-center">
|
||||
<img src="https://abp.io/assets/png/mastering-abp-framework.webp" style="max-width: 400px;" class="w-100 mb-5 my-md-3">
|
||||
</div>
|
||||
<div class="col-md d-flex align-items-center">
|
||||
<div class="pe-0 pe-md-4">
|
||||
<small class="text-uppercase text-muted">THE OFFICIAL GUIDE</small>
|
||||
<h2 class="mb-4">Mastering ABP Framework</h2>
|
||||
<p class="mb-4">Written by the creator of the ABP Framework, this book will help you gain a complete understanding of the framework and modern web application development techniques.</p>
|
||||
<div class="mb-4">
|
||||
<a href="https://www.amazon.com/gp/product/B097Z2DM8Q/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0" class="btn btn-success mb-1">
|
||||
Buy on Amazon US
|
||||
</a>
|
||||
<a href="https://www.packtpub.com/product/mastering-abp-framework/9781801079242" class="btn btn-primary mb-1">
|
||||
Buy on PACKT
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="my-3 text-center">
|
||||
<h3>Let's improve your application!</h3>
|
||||
<p>Here are some links to help you get started:</p>
|
||||
</div>
|
||||
|
||||
<div class="card mt-4 mb-5">
|
||||
<div class="card-body">
|
||||
<div class="row text-center justify-content-md-center">
|
||||
<div class="col-lg-4">
|
||||
<div class="p-4">
|
||||
<h5 class="mb-3"><i class="fas fa-book text-secondary d-block my-3 fa-2x"></i> Learn the ABP Framework</h5>
|
||||
<p>Explore the compherensive documentation to learn how to build a modern web application.</p>
|
||||
<a href="https://docs.abp.io/en/abp/latest?ref=tmpl" target="_blank" class="btn btn-link px-1">See Documents <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 border-start">
|
||||
<div class="p-4">
|
||||
<h5 class="mb-3"><i class="fas fa-cubes text-secondary d-block my-3 fa-2x"></i> Samples</h5>
|
||||
<p>See the example projects built with the ABP Framework.</p>
|
||||
<a href="https://docs.abp.io/en/abp/latest/Samples/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">All samples <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 border-start">
|
||||
<div class="p-4">
|
||||
<h5 class="mb-3"><i class="fas fa-users text-secondary d-block my-3 fa-2x"></i> ABP Community</h5>
|
||||
<p>Get involved with a vibrant community and become a contributor.</p>
|
||||
<a href="https://community.abp.io/" target="_blank" class="btn btn-link px-1">Community <i class="fas fa-chevron-right"></i></a>
|
||||
<a href="https://docs.abp.io/en/abp/latest/Contribution/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">Contribute <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center mt-lg-3 justify-content-md-center">
|
||||
<div class="col-lg-4">
|
||||
<div class="p-4">
|
||||
<h5 class="mb-3"><i class="fas fa-pen-nib text-secondary d-block my-3 fa-2x"></i> ABP Blog</h5>
|
||||
<p>Take a look at our recently published articles.</p>
|
||||
<a href="https://blog.abp.io/abp?ref=tmpl" target="_blank" class="btn btn-link px-1">See Blog <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 border-start">
|
||||
<div class="p-4">
|
||||
<h5 class="mb-3"><i class="fab fa-github text-secondary d-block my-3 fa-2x"></i> Github</h5>
|
||||
<p>Do you love the ABP Framework? Please <strong>give a star</strong> to support it!</p>
|
||||
|
||||
<a href="https://github.com/abpframework/abp/" target="_blank" class="btn btn-link px-1">See Open Source Framework <i class="fas fa-chevron-right"></i></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 border-start">
|
||||
<div class="p-4">
|
||||
<h5 class="mb-3"><i class="fab fa-stack-overflow text-secondary d-block my-3 fa-2x"></i> Stackoverflow</h5>
|
||||
<p>See answers to previously asked questions or ask a new one.</p>
|
||||
<a href="https://stackoverflow.com/questions/tagged/abp" target="_blank" class="btn btn-link px-1">Questions <i class="fas fa-chevron-right"></i></a>
|
||||
<a href="https://stackoverflow.com/questions/ask" target="_blank" class="btn btn-link px-1">Ask a Question <i class="fas fa-chevron-right"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-5 my-3 text-center">
|
||||
<h3>Meet the ABP Commercial</h3>
|
||||
<p>A Complete Web Application Platform Built on the ABP Framework</p>
|
||||
</div>
|
||||
|
||||
<div class="card mt-4 mb-5">
|
||||
<div class="card-body">
|
||||
<p class="px-lg-5 mx-lg-5 py-3 text-center">
|
||||
<a href="https://commercial.abp.io/" target="_blank">ABP Commercial</a> is a platform based on the open source ABP framework. It provides pre-built application modules,
|
||||
rapid application development tooling, professional UI themes, premium support and more.
|
||||
</p>
|
||||
|
||||
<div class="row text-center justify-content-md-center">
|
||||
<div class="col-lg-2">
|
||||
<div class="p-3">
|
||||
<h6>
|
||||
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Startup Templates
|
||||
<a href="https://commercial.abp.io/startup-templates?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 border-start">
|
||||
<div class="p-3">
|
||||
<h6>
|
||||
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Application Modules
|
||||
<a href="https://commercial.abp.io/modules?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 border-start">
|
||||
<div class="p-3">
|
||||
<h6>
|
||||
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Developer<br />Tools
|
||||
<a href="https://commercial.abp.io/tools?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 border-start">
|
||||
<div class="p-3">
|
||||
<h6>
|
||||
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> UI<br /> Themes
|
||||
<a href="https://commercial.abp.io/themes?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 border-start">
|
||||
<div class="p-3">
|
||||
<h6>
|
||||
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Premium Support
|
||||
<a href="https://support.abp.io/QA/Questions?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 border-start">
|
||||
<div class="p-3">
|
||||
<h6>
|
||||
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Additional Services
|
||||
<a href="https://commercial.abp.io/additional-services?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
|
||||
</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-5 text-center">
|
||||
<p class="align-middle">
|
||||
<a href="https://twitter.com/abpframework" target="_blank" class="mx-2"><i class="fab fa-twitter"></i><span class="text-secondary"> Abp Framework</span></a>
|
||||
<a href="https://twitter.com/abpcommercial" target="_blank" class="mx-2"><i class="fab fa-twitter"></i><span class="text-secondary"> Abp Commercial</span></a>
|
||||
<a href="https://github.com/abpframework/abp" target="_blank" class="mx-2"><i class="fab fa-github"></i><span class="text-secondary"> abpframework</span></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,6 @@
|
|||
namespace Sinet.Universal.Admin.Blazor.Pages;
|
||||
|
||||
public partial class Index
|
||||
{
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/* Write here your styles for the Index page */
|
|
@ -0,0 +1,23 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
|
||||
namespace Sinet.Universal.Admin.Blazor;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public async static Task Main(string[] args)
|
||||
{
|
||||
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
||||
|
||||
var application = await builder.AddApplicationAsync<AdminBlazorModule>(options =>
|
||||
{
|
||||
options.UseAutofac();
|
||||
});
|
||||
|
||||
var host = builder.Build();
|
||||
|
||||
await application.InitializeApplicationAsync(host.Services);
|
||||
|
||||
await host.RunAsync();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "https://localhost:44372",
|
||||
"sslPort": 44372
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Sinet.Universal.Admin.Blazor": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "https://localhost:44372",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
|
||||
|
||||
<Import Project="..\..\..\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazorise.Bootstrap5" Version="1.3.1" />
|
||||
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.3.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme" Version="2.4.*-*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="7.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="7.4.1" />
|
||||
<PackageReference Include="Volo.Abp.TenantManagement.Blazor.WebAssembly" Version="7.4.1" />
|
||||
<PackageReference Include="Volo.Abp.SettingManagement.Blazor.WebAssembly" Version="7.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\common\Sinet.Universal.Admin.HttpApi.Client\Sinet.Universal.Admin.HttpApi.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
</Project>
|
|
@ -0,0 +1,14 @@
|
|||
@using System.Net.Http
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
@using Microsoft.AspNetCore.Components.Routing
|
||||
@using Microsoft.AspNetCore.Components.Web
|
||||
@using Microsoft.AspNetCore.Components.WebAssembly.Http
|
||||
@using Microsoft.JSInterop
|
||||
@using Volo.Abp.AspNetCore.Components.Web
|
||||
@using Sinet.Universal.Admin.Blazor
|
||||
@using Blazorise
|
||||
@using Blazorise.DataGrid
|
||||
@using Volo.Abp.BlazoriseUI
|
||||
@using Volo.Abp.BlazoriseUI.Components
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"App": {
|
||||
"SelfUrl": "https://localhost:44372"
|
||||
},
|
||||
"AuthServer": {
|
||||
"Authority": "https://localhost:44333",
|
||||
"ClientId": "Admin_Blazor",
|
||||
"ResponseType": "code"
|
||||
},
|
||||
"RemoteServices": {
|
||||
"Default": {
|
||||
"BaseUrl": "https://localhost:44333"
|
||||
}
|
||||
},
|
||||
"AbpCli": {
|
||||
"Bundle": {
|
||||
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
|
||||
"Name": "global",
|
||||
"Parameters": {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Sinet.Universal.Admin.Blazor</title>
|
||||
<base href="/" />
|
||||
|
||||
<!--ABP:Styles-->
|
||||
<link href="global.css?_v=638289244910528761" rel="stylesheet"/>
|
||||
<link href="main.css" rel="stylesheet"/>
|
||||
<!--/ABP:Styles-->
|
||||
<link href="Sinet.Universal.Admin.Blazor.styles.css" rel="stylesheet"/>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="abp-application-layout bg-light">
|
||||
<div id="ApplicationContainer">
|
||||
<div class="spinner">
|
||||
<div class="double-bounce1"></div>
|
||||
<div class="double-bounce2"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--ABP:Scripts-->
|
||||
<script src="global.js?_v=638289244912430522"></script>
|
||||
<!--/ABP:Scripts-->
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,55 @@
|
|||
/* Global styles for the Admin application */
|
||||
|
||||
:root .lpx-brand-logo {
|
||||
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
|
||||
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: block;
|
||||
position: fixed;
|
||||
top: calc( 50% - ( 40px / 2) );
|
||||
right: calc( 50% - ( 40px / 2) );
|
||||
}
|
||||
|
||||
.double-bounce1, .double-bounce2 {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
background-color: #333;
|
||||
opacity: 0.6;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
-webkit-animation: sk-bounce 2.0s infinite ease-in-out;
|
||||
animation: sk-bounce 2.0s infinite ease-in-out;
|
||||
}
|
||||
|
||||
.double-bounce2 {
|
||||
-webkit-animation-delay: -1.0s;
|
||||
animation-delay: -1.0s;
|
||||
}
|
||||
|
||||
@-webkit-keyframes sk-bounce {
|
||||
0%, 100% {
|
||||
-webkit-transform: scale(0.0)
|
||||
}
|
||||
|
||||
50% {
|
||||
-webkit-transform: scale(1.0)
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes sk-bounce {
|
||||
0%, 100% {
|
||||
transform: scale(0.0);
|
||||
-webkit-transform: scale(0.0);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(1.0);
|
||||
-webkit-transform: scale(1.0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p role="alert">Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
|
@ -0,0 +1,20 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce;
|
||||
|
||||
public static class BasketService
|
||||
{
|
||||
public static List<BasketItemDto> GetBasketItems() => new List<BasketItemDto>
|
||||
{
|
||||
new BasketItemDto(1,"Apple Watch Series 5","Apple",4,1,"Delivery by Sun, Nov 28","12% off 3 offers Available",339.99m,"1.png",true),
|
||||
new BasketItemDto(2,"Google - Google Home - White/Slate fabric","Google",4,1,"Delivery by Wed, Dec 1","16% off 1 offers Available",129.29m,"7.png",true),
|
||||
new BasketItemDto(3,"Apple iPhone 11 (64GB, Black)","Apple",5,1,"Delivery by Thu, Nov 25","8% off 1 offers Available",669.99m,"2.png",true),
|
||||
new BasketItemDto(4,"Apple iMac 27-inch","Apple",4,1,"Delivery by Mon, Nov 29","3% off 4 offers Available",999.99m,"3.png",true),
|
||||
new BasketItemDto(5,"Apple - MacBook Air® (Latest Model) - 13.3\" Display - Silver","Apple",4,1,"Delivery by Sun, Nov 28","17% off 4 offers Available",999.99m,"5.png",false)
|
||||
};
|
||||
|
||||
public static List<AddressTypeDto> GetAddressTypes() => new List<AddressTypeDto>
|
||||
{
|
||||
new AddressTypeDto("Home", "1"),
|
||||
new AddressTypeDto("Work", "2")
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce.Dto;
|
||||
|
||||
public class AddressDto
|
||||
{
|
||||
[Required]
|
||||
public string FullName { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string MobileNumber { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string HouseNo { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string Landmark { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string City { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string Pincode { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string State { get; set; } = default!;
|
||||
|
||||
[Required]
|
||||
public string AddressType { get; set; } = default!;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce.Dto;
|
||||
|
||||
public class AddressTypeDto
|
||||
{
|
||||
public string Label { get; set; }
|
||||
public string Value { get; set; }
|
||||
|
||||
public AddressTypeDto(string label, string value)
|
||||
{
|
||||
Label = label;
|
||||
Value = value;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce.Dto;
|
||||
|
||||
public class BasketItemDto
|
||||
{
|
||||
public BasketItemDto(int id, string name, string company, float score, uint qty, string delivery,
|
||||
string offers, decimal price, string pictureFileName, bool freeShipping)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Company = company;
|
||||
Score = score;
|
||||
Qty = qty;
|
||||
Delivery = delivery;
|
||||
Offers = offers;
|
||||
Price = price;
|
||||
PictureFileName = pictureFileName;
|
||||
FreeShipping = freeShipping;
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
public string Company { get; set; } = default!;
|
||||
|
||||
public float Score { get; set; }
|
||||
|
||||
public uint Qty { get; set; }
|
||||
|
||||
public string Delivery { get; set; } = default!;
|
||||
|
||||
public string Offers { get; set; } = "";
|
||||
|
||||
public decimal Price { get; set; }
|
||||
|
||||
public string PictureFileName { get; set; } = "";
|
||||
|
||||
public bool FreeShipping { get; set; }
|
||||
|
||||
public string GetFormatPrice()
|
||||
{
|
||||
return $"${Price}";
|
||||
}
|
||||
|
||||
public string GetPictureUrl()
|
||||
{
|
||||
return $"./img/apps-eCommerce/{PictureFileName}";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce.Dto;
|
||||
|
||||
public class GoodsDto
|
||||
{
|
||||
public Guid Id { get; init; }
|
||||
|
||||
public string Name { get; init; }
|
||||
|
||||
public string Description { get; init; }
|
||||
|
||||
public double Price { get; init; }
|
||||
|
||||
public string PictureFile { get; init; }
|
||||
|
||||
public string Category { get; set; }
|
||||
|
||||
public int Rating { get; set; }
|
||||
|
||||
public string Brand { get; set; }
|
||||
|
||||
public bool Favorite { get; set; }
|
||||
|
||||
public GoodsDto(string name, double price, string pictureFile, string category, int rating, string brand, string description)
|
||||
{
|
||||
Id = Guid.NewGuid();
|
||||
Name = name;
|
||||
Description = description;
|
||||
Price = price;
|
||||
PictureFile = pictureFile;
|
||||
Category = category;
|
||||
Rating = rating;
|
||||
Brand = brand;
|
||||
}
|
||||
|
||||
public GoodsDto(Guid id,string name, double price, string pictureFile, string category, int rating, string brand, string description)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
Description = description;
|
||||
Price = price;
|
||||
PictureFile = pictureFile;
|
||||
Category = category;
|
||||
Rating = rating;
|
||||
Brand = brand;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce.Dto;
|
||||
|
||||
public class MultiRangeDto
|
||||
{
|
||||
public MultiRangeDto(RangeType rangeType, string text, double leftNumber, double rightNumber = 0)
|
||||
{
|
||||
RangeType = rangeType;
|
||||
Text = text;
|
||||
LeftNumber = leftNumber;
|
||||
RightNumber = rightNumber;
|
||||
}
|
||||
|
||||
public RangeType RangeType { get; set; }
|
||||
|
||||
public string Text { get; set; }
|
||||
|
||||
public double LeftNumber { get; set; }
|
||||
|
||||
public double RightNumber { get; set; }
|
||||
}
|
||||
|
||||
public enum RangeType
|
||||
{
|
||||
All,
|
||||
Less,
|
||||
LessEqual,
|
||||
More,
|
||||
MoreEqual,
|
||||
Range
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce.Dto;
|
||||
|
||||
public class RelatedGoodsDto
|
||||
{
|
||||
public string ImgUrl { get; set; } = default!;
|
||||
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
public string Brand { get; set; } = default!;
|
||||
|
||||
public int Rating { get; set; }
|
||||
|
||||
public decimal Price { get; set; }
|
||||
|
||||
public RelatedGoodsDto(string name, string brand, string imgUrl, decimal price, int rating)
|
||||
{
|
||||
Name = name;
|
||||
Brand = brand;
|
||||
ImgUrl = imgUrl;
|
||||
Price = price;
|
||||
Rating = rating;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
namespace Sinet.Universal.Admin.Web.Data.App.ECommerce;
|
||||
|
||||
public class ShopService
|
||||
{
|
||||
static List<GoodsDto> _datas = new ()
|
||||
{
|
||||
new("GA506B 温热管线饮水机",239.99, "/img/apps-eCommerce/15.jpg", "饮水机 |