Giter Site home page Giter Site logo

jjconsulting / jjmasterdata Goto Github PK

View Code? Open in Web Editor NEW
166.0 4.0 21.0 16 MB

.NET CRUD generator library with Bootstrap support to create dynamic forms at runtime from a data dictionary.

Home Page: https://md.jjconsulting.tech/

License: GNU General Public License v3.0

C# 81.50% CSS 1.27% HTML 9.76% JavaScript 1.99% TypeScript 4.68% SCSS 0.80%
crud-generator api-crud bootstrap-taghelper metadata forms-builder dynamic-forms dotnet csharp data-dictionary forms

jjmasterdata's Introduction


.NET 6 TS TS NuGet Discord

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.

Useful Links


Features

  • Components generated at runtime 🔥
  • Data exportation & importation ↔️
  • Database script generation ✍️
  • Plugins support by interfaces 🪄
  • Multiple forms using relationships⛓️

Getting Started

Setup-JJMasterData.mp4
  1. Create an ASP.NET Core project (it can be Blazor, MVC, Razor Pages, whetever you like...)
  2. Install JJMasterData.Web
dotnet add package JJMasterData.Web
  1. Configure your IConfiguration source with a connection string at JJMasterData:ConnectionString and a secret key at JJMasterData:SecretKey
{
  "JJMasterData": {
    "DataDictionaryTableName": "MasterData",
    "ConnectionString": "Server=localhost;Database=JJMasterData;Integrated Security=True;Trust Server Certificate=true",
    "ReadProcedurePattern": "{tablename}Get",
    "WriteProcedurePattern": "{tablename}Set",
    "SecretKey": "ExampleSecretKey"
  }
}
  1. At Program.cs add the following lines:
using JJMasterData.Web.Configuration;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddJJMasterDataWeb();

///...

var app = builder.Build();

///...

app.UseJJMasterDataWeb();
app.MapJJMasterData();

app.Run();
  1. Create a wwwroot folder if your project is empty
  2. Run the project and visit /en-US/DataDictionary/Element/Index
image

You can get the appsettings.json schema URL from here

See all steps in documentation.


Building from source 🧰

  1. Install .NET 8

  2. Install NodeJS

  3. Clone this git repository

  4. Open JJMasterData.sln file at your IDE

  5. Set the WebEntryPoint as startup project

  6. At src/Web run at your terminal

npm i
  1. Run the project

Special Thanks

Code contributors


Alt

Bugs and feature requests 🐛

Have a bug or a feature request? Please first search for existing and closed issues.
If your problem or idea is not addressed yet, please open a new issue.

jjmasterdata's People

Contributors

andresequinel avatar apchenjun avatar fcandidotech avatar gumbarros avatar ivanilson22 avatar leonardojmb avatar luciopelinson avatar ygorsilv1997 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jjmasterdata's Issues

Contains filter to Numeric fields.

Describe the bug
Contains filter causes unexpected error on numeric fields.

To Reproduce
Steps to reproduce the behavior:

  1. Add a numeric field
  2. Set the filter to Contains
  3. Unexpected error in filtering

Error on generate log

Describe the bug
Error on generate log

To Reproduce
Throw 2 erros in the same time

Screenshots
image

.NET version
[.NET Framework 4.8 or .NET 6+]

Additional context
Create a identity field in table log as PK

UI Bugs

  1. Disable sorting is hiding the entire header
  2. Importation buttons not working (can't repro)
  3. Exportation is exporting raw HTML
  4. DatePicker not working (fixed at main)
  5. Importation not working at all
  6. Downloads not working on YARP proxy webapps using Google Chrome

Edit README.MD

  • Edit README.MD to contain only showcases and explanations about JJMasterData.
  • Add a better gif
  • Move all Initial Setup things to the doc

Texts in uppercase

Is your feature request related to a problem? Please describe.
Have the option to put the texts in uppercase

Option to not autocomplete Date components with today date.

User Story

Is your feature request related to a problem? Please describe.
Yes, the customer don't want to autocomplete the DateTime field with the today date

Describe the solution you'd like
Create a boolean field to auto-complete or not the default DateTime

Describe alternatives you've considered
Weird JS workarounds. Default value don't work.

Additional context
Asked by @Claudio-Bola

Technical Data

  • Should we store at FormElementField? I think it will be bad every metadata-field carry a field to show or not today date.
  • Should we add the Attributes field to the developer UI onJJMasterData.Web? With this any front-end customization, can be stored in a single field.

Audit log history

Describe the bug
When we enabled audit log history and open options to export data, appear a incorrect screen

Screenshots
image

.NET version
[.NET Framework 4.8 or .NET 6+]

Add example folder with a Razor Pages project.

Is your feature request related to a problem? Please describe.
Yes, JJMasterData is not well documented for newcomers.

Describe the solution you'd like
Add a example folder with a Razor Pages project, with each page a JJ Component.

WebOptimizer alternative to runtime bundle and minify of CSS/JS files.

Is your feature request related to a problem? Please describe.
We need a runtime bundle and minify solution because of the specified Bootstrap version in appsettings.json or ISettings. Webpack and Gulp are build-time.

Describe the solution you'd like
A working WebOptimizer or similar implementation in JJMasterData.Web

Describe alternatives you've considered
Forking WebOptimizer to JJMasterData

Additional context
We need to bundle and minify the JS and CSS files to improve performance. WebOptimizer is with bugs on .NET 6 ligershark/WebOptimizer#240

Add C# class source generation

Is your feature request related to a problem? Please describe.
Not with MasterData, @ygorsilv1997 wanted a class from a DataDictionary to use in a project, but the dictionary have 90+ fields.

Describe the solution you'd like
A C# class generation, like the SQL one.

Describe alternatives you've considered
Hashtable.

Add pop-up size option to UrlRedirect actions

Is your feature request related to a problem? Please describe.
Yes, some screens in URLRedirect popups, needs a better pop-up size.

Describe the solution you'd like
A popup size parameter.

Describe alternatives you've considered
Custom editing the default value on jjmasterdata.js.

Additional context
Suggested by many JJConsulting members.

JJTextFile incorrect layout popup

Describe the bug
When we custom a layout and open a JJTextFile upload files appear in incorrect layout popup

Expected behavior
Open popup without custom layouts

Screenshots
image

.NET version
[.NET Framework 4.8 or .NET 6+]

Add a expressions editor

Is your feature request related to a problem? Please describe.
Yes, the expressions fields are not well documented.

Describe the solution you'd like
A expression editor, with a toggle for static values and a SQL editor for the dynamic ones plus a documentation about expression fields.

JJFormUpload - Remove jQuery dependency

Is your feature request related to a problem? Please describe.
Partially, removing a jQuery dependency is a good step to MasterData be self-contained without dependencies.

Describe the solution you'd like
Removing the jQuery plugin.

Sun Version - Breaking Changes Roadmap

ActionEventArgs - Change BasicAction Action to string ActionName preventing reference errors.

Modify FieldBehavior enum:

public enum FieldBehavior
{
    Real = 1,
    WriteOnly = 2,
    ReadOnly = 3
}

DataItem Components - Add a third option, Database Table

Is your feature request related to a problem? Please describe.
Yes, writing a query for DataItem components cause a connection to the database in every row.

Describe the solution you'd like
Create a third option for DataItem, "Table", populated with tablename, key and value column.
The database will connect only one time and after that, the values are populated from it return.

Describe alternatives you've considered
Using the static option.

DataDictionary not deleted from tb_masterdata

Describe the bug
It is not deleting the record from the data dictionary, it disappears from the list, but it still exists in the tb_masterdata table. Reported by @selleiro.

To Reproduce
Delete a DataDictionary.

Expected behavior
The records must be deleted from tb_masterdata.

.NET version
.NET 6

Bootstrap 3 - Get Scripts layout

Describe the bug
Layout is broken on Bootstrap 3, reported by @selleiro .

To Reproduce
Open Get Scripts screen

Screenshots
If applicable, add screenshots to help explain your problem.
image

.NET version
.NET 6

Class Factory and DictionaryDao

Rename Factory to EntityRepository
Rename Dictionary to DictionaryRepository
Create interface and use DI (Dependency Injection)
Remove IDataAccess and use IEntityRepository or IDictionaryRepository
Remove WithDataAccess and Create WithRepository to add DI
Remove IDataAccess from JJBaseView and apply Repository pattern

Remove Plugins from this repository

Is your feature request related to a problem? Please describe.
Yes, the solution is heavy with 18 projects.

Describe the solution you'd like
A repo for each plugin.

Create docs for JSON schema

Is your feature request related to a problem? Please describe.
Yes, Visual Studio don't autocomplete JJMasterData settings on appsettings.json.

Describe the solution you'd like
Add a tuturial on how to add JJMasterData Schema on docs.

Phone Fix

Is your feature request related to a problem? Please describe.
have a component to show formatted landline phone.
example: (11) 3857-3822

image

Add UI for MasterData Settings

Is your feature request related to a problem? Please describe.
Ease of configuring database connection

Describe the solution you'd like
In the appsettings or web.config file include the path of the database connection UDL file.
Example:
ConnectionString:"connection.udl"

image

MongoDb

Fix filtes;
Improve Docs;

Refactor class name and namespaces

Classes

CommandType to CommandOperation
Factory to EntityRepository
UIForm to FormUI
UIGrid to GridUI

Namespaces

JJMasterData.Core.WebComponents to JJMasterData.Core.Web.Components
JJMasterData.Core.Http to JJMasterData.Core.Web.Http
JJMasterData.Commons.Dao to JJMasterData.Commons.Data
JJMasterData.Commons.Language to JJMasterData.Commons.Localization

Documentation DataDictionary UI

  • Documentation how create a DataDictionary;
  • Documentation how create filters;
  • Documentation all options with screenshoots;

Log view errors.

Apply fixes and improvements to log screens

-Error saving generic log

-Fix layout bs5 error details

-Improve display when there is no log

-Error converting date according to culture

Error querying searchbox

Describe the bug
After placing a product and filling in the other fields, when trying to change the product, the field loses its search function.

Expected behavior
It should bring the product list, according to the letters I entered.

Screenshots
image

.NET version
.NET Framework 4.8

Enable plugin to create dynamic trigger actions

Is your feature request related to a problem? Please describe.
We would like to create a field with a trigger many fields in the same request.
For example when a client type a zip code dispatch a trigger that filled another fields.

Describe the solution you'd like
A Interface that allow create any event to dispatcher a trigger.

builder.Services.AddJJMasterDataWeb().WithCustomAction(ITriggerAction);

image

Enable configure fields by interface
image

@selleiro

Error when upload files to a form

Describe the bug
We developed a form in order to upload files to server. This files is stored on server in the path described on data dictionary, but we noticed, thought firefox that masterdata starts to make several (and unnecessary calls). The attached video could show what is happening.

We also notice the requisitions is also calling database procedures.

To Reproduce
Steps to reproduce the behavior:

  1. Create a masterdata form with upload functions;
  2. Upload the data;

You could have a better understanding watching the video that I would send by private cloud.

Expected behavior
Fix the undesired requests.

Screenshots
If applicable, add screenshots to help explain your problem.

.NET version
[.NET Framework 4.8 or .NET 6+]

Additional context
Add any other context about the problem here.

Create a xUnit extension method

Is your feature request related to a problem? Please describe.
Create a xUnit extension method for Data Dictionaries.

Describe the solution you'd like

Assert.DataDictionary("MyDictionary");

Search Json elements in dictionary filter screen

In the data dictionary, enable a search on the texts informed in the Masterdata json. Example: locate the procedure sp_getlistapreco, which was used in an SQL action. Indicate in which name of the dictionary it is found.

Authorization docs

Is your feature request related to a problem? Please describe.
There is no documentation on how to secure JJMasterData routes.

Describe the solution you'd like
Add docs about authorization

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.