Skip to content

Commit

Permalink
JJMasterData 3.1 - Saturn Version 🪐 (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: Gustavo Mauricio de Barros <gustavomauriciodebarros@gmail.com>
Co-authored-by: Ivan <ivanilsonsantosoliveira@gmail.com>
Co-authored-by: lucio <lucio.pelinson@hotmail.com>
Co-authored-by: André Luis Sequinel <100393691+AndreSequinel@users.noreply.github.com>
Co-authored-by: ygor.silva <ygor.silva@jjconsulting.combr>
Co-authored-by: AndreSequinel <andresequinel@gmail.com>
  • Loading branch information
7 people authored Jan 19, 2023
1 parent c86fb87 commit 8a19ee4
Show file tree
Hide file tree
Showing 753 changed files with 31,783 additions and 48,770 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,23 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 7.0.100

- name: Setup NodeJS
uses: actions/setup-node@v3.4.1

- name: Restore dependencies
run: dotnet restore

- name: Restore TypeScript dependencies
run: |
cd src/JJMasterData.Web
npm install
cd ../../..
- name: Build
run: dotnet build --no-restore
run: dotnet build
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,12 @@ ASALocalRun/
healthchecksdb

#Custom
/doc/JJMasterData.Doc/Help/**
/doc/JJMasterData.Documentation/lib/**
/doc/JJMasterData.Documentation/_site/**

# Dangerous values to public source control
appsettings.json

# Ignore default JJConsulting logs
*_applog.txt
*.DS_Store
199 changes: 156 additions & 43 deletions JJMasterData.sln

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion JJMasterData.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
<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:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JJ/@EntryIndexedValue">JJ</s:String></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DAO/@EntryIndexedValue">DAO</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DB/@EntryIndexedValue">DB</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=IO/@EntryIndexedValue">IO</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JJ/@EntryIndexedValue">JJ</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MSSQL/@EntryIndexedValue">MSSQL</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQ/@EntryIndexedValue">SQ</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Pelinson/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Protheus/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
43 changes: 29 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
<a href="https://img.shields.io/badge/Microsoft_SQL_Server-CC2927">
<img src="https://img.shields.io/badge/SQL_Server-CC2927?logo=microsoft-sql-server&logoColor=white" alt="TS">
</a>
<a href="https://img.shields.io/badge/Python">
<img src="https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white" alt="SQL Server">
</a>
<a href="https://www.nuget.org/profiles/jjconsulting">
<img src="https://img.shields.io/nuget/v/JJMasterData.Web.svg?color=004880" alt="NuGet">
</a>
Expand All @@ -30,16 +27,10 @@
JJMasterData is an open-source .NET library to help you create dynamic CRUDs quickly from data dictionaries (database metadata), along with other boilerplate-intensive things like exporting and importing data.

## Features
- Complete CRUD operations ✅
- Pages generated at runtime ✅
- Data export & import ✅
- Hangfire support ✅
- Database script generation ✅
- IronPython support ✅
- Bootstrap 3,4 & 5 support ✅
- Log interface ✅
- xUnit library ✅

- Pages generated at runtime 🔥
- Data exportation & importation ↔️
- Database script generation ✍️
- Plugins support by [interfaces](https://portal.jjconsulting.com.br/jjdoc/articles/plugins/intro.html) 🪄
<br>

# Demo
Expand All @@ -62,6 +53,30 @@ See all steps in [documentation](https://portal.jjconsulting.tech/jjdoc/articles

<br>

## Building from source 🧰
1. Install [.NET 7](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)

2. Install [NodeJS](https://nodejs.org/en/download/)

3. Clone this git repository

4. Open `JJMasterData.sln `file at your IDE

5. Set the `JJMasterData.WebExample` as startup project

6. At `src/JJMasterData.Web` run at your terminal
```bash
npm i
```
7. It will be necessary to add a database of your choice. You will need add a ConnectionString at your `IConfiguration` source.<br>
![image](https://user-images.githubusercontent.com/100393691/203789109-ef71f492-3f90-4739-8c41-8a92890c72dc.png)

8. Run the project

9. This is the expected output <br>
![image](https://user-images.githubusercontent.com/52143624/205990349-fc9c24d1-c9e6-4729-a334-4d0487222d29.png)


## Special Thanks

#### Code contributors
Expand All @@ -72,7 +87,7 @@ See all steps in [documentation](https://portal.jjconsulting.tech/jjdoc/articles

<br>

## Bugs and feature requests
## Bugs and feature requests 🐛
Have a bug or a feature request?
Please first search for existing and closed issues.</br>
If your problem or idea is not addressed yet, [please open a new issue](https://github.com/jjconsulting/JJMasterData/issues/new).
48 changes: 48 additions & 0 deletions appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"AllowedHosts": "*",

"ConnectionStrings": {
"ConnectionString": "data source=(localdb)\\MSSQLLocalDB;database=JJMasterData"
},
"ConnectionProviders": {
"ConnectionString": "System.Data.SqlClient"
},
"JJMasterData": {
"DataDictionary" : {
"FolderPath" : "Metadata"
},
"MongoDB": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "jjmasterdata",
"CollectionName": "metadata"
},
"DataDictionaryTableName": "tb_masterdata",
"ResourcesTableName": "tb_masterdata_resources",
"PrefixGetProc": "sp_{tablename}_get",
"PrefixSetProc": "sp_{tablename}_set",
"LayoutPath": "_Layout",
"BootstrapVersion": 5,
"Theme": "dark-blue"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
},
"Console": {
"LogLevel": {
"Default": "Debug"
}
},
"Database": {
"LogLevel": {
"Default": "Trace",
"Microsoft.AspNetCore": "None"
},
"TableName": "JJMasterDataLogger"
},
"File": {
"FileName": "Log/AppLog-yyyyMMdd.txt"
}
}
}
12 changes: 8 additions & 4 deletions doc/JJMasterData.Documentation/JJMasterData.Documentation.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
</PropertyGroup>

<ItemGroup>
<Compile Remove="JJMasterData.Sample\**" />
<Compile Remove="lib\**" />
<EmbeddedResource Remove="JJMasterData.Sample\**" />
<EmbeddedResource Remove="lib\**" />
<None Remove="JJMasterData.Sample\**" />
<None Remove="lib\**" />
<Compile Remove="restapi\**" />
<EmbeddedResource Remove="restapi\**" />
<None Remove="restapi\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="docfx.console" Version="2.58.9">
<None Remove="server.bat" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="docfx.console" Version="2.59.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion doc/JJMasterData.Documentation/articles/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ builder.Services.AddAuthorization(options =>
});
```

If you want to protect specific actions or fields in your DataDictionary, you will need to implement your own [JJFormView](articles/components/form_view.md) in your custom View or use the [IFormEvent](articles/form_events/intro.md) interface in the method OnInstanceCreated, customizing your JJFormView object.
If you want to protect specific actions or fields in your DataDictionary, you will need to implement your own [JJFormView](components/form_view.md) in your custom View or use the <xref:JJMasterData.Core.FormEvents.Abstractions.IFormEvent> interface in the method OnInstanceCreated, customizing your JJFormView object.
<br>
[Learn more here.](custom_rules.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ quickly provide matching colored icons on any alert.

<img alt="Importing" src="../../media/SimpleExampleIconJJAlert.png"/>

**Button Close** Set whether to display the close alert button.
**Close Button** Set whether to display the close alert button.

```csharp
alert.Messages.Add("A simple info alert with icon and close button - check it out! - check it out!");
Expand All @@ -47,8 +47,20 @@ quickly provide matching colored icons on any alert.

<img alt="Importing" src="../../media/SimpleExampleButtonCloseJJAlert.png"/>

## TagHelper

JJAlert also have a TagHelper

```html
<jj-alert
title="Success"
message="Connection successfully estabilished."
icon="@IconType.CheckCircle"
color="@PanelColor.Success"/>
```

> [!TIP]
> JJAlert does not consider internationalization, so the end user must pay attention to the translation using the Translate.Key(string) method as shown below
> JJAlert does consider internationalization.

You can check all JJAlert properties in our [API Reference](https://portal.jjconsulting.com.br/jjdoc/lib/JJMasterData.Core.WebComponents.JJAlert.html)
16 changes: 16 additions & 0 deletions doc/JJMasterData.Documentation/articles/components/link_button.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# JJLinkButton

Represents a clickable button.

## Usage

```html
<jj-link-button
icon="@Home"
url-action="http://www.jjconsulting.tech"
text="JJ Consulting"/>
```

## Customization

You can check all properties from JJLinkButton at our [API Reference](https://portal.jjconsulting.com.br/jjdoc/lib/JJMasterData.Core.WebComponents.JJLinkButton.html)
48 changes: 48 additions & 0 deletions doc/JJMasterData.Documentation/articles/components/searchbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# JJSearchBox

JJSearchBox is a searchable combobox.

## Usage

### SQL Query

```csharp
@{
var searchBox = new JJSearchBox
{
Name = "mySearchBox",
DataItem = new FormElementDataItem
{
Command = new("SELECT ID, DESCRIPTION FROM TABLE")
}
};
}

/// ...
@Html.Raw(searchBox.GetHtml())
/// ...
```
### Values

```csharp
@{
var search = new JJSearchBox
{
Name = "mySearchBox",
DataItem = new FormElementDataItem
{
Itens = new List<DataItemValue>
{
new("ID","DESCRIPTION")
}
}
};
}
/// ...
@Html.Raw(search.GetHtml())
/// ...
```

## Customization

You can check all properties from JJSearchBox at our [API Reference](https://portal.jjconsulting.com.br/jjdoc/lib/JJMasterData.Core.WebComponents.JJSearchBox.html)
Loading

0 comments on commit 8a19ee4

Please sign in to comment.