Browse Source

Primeira versao...

master
Eduardo Velasques 3 years ago
commit
58174a4aaa
59 changed files with 56723 additions and 0 deletions
  1. +7
    -0
      .editor.config
  2. +18
    -0
      .gitignore
  3. +3
    -0
      config/_development.js
  4. +3
    -0
      config/_production.js
  5. BIN
      config/icon.png
  6. BIN
      dbs/loja.mv.db
  7. +147
    -0
      dbs/loja.trace.db
  8. BIN
      public/images/logo-main.png
  9. BIN
      public/images/logo.png
  10. +55300
    -0
      public/scripts/main.js
  11. +1
    -0
      public/scripts/main.js.map
  12. +13
    -0
      public/styles/main.css
  13. +22
    -0
      server/core/_config.js
  14. +5
    -0
      server/core/_init.js
  15. +0
    -0
      server/core/_request_close.js
  16. +0
    -0
      server/core/_request_end.js
  17. +17
    -0
      server/core/_request_error.js
  18. +2
    -0
      server/core/_request_start.js
  19. +14
    -0
      server/core/_request_url.js
  20. +13
    -0
      server/core/_service_config.js
  21. +0
    -0
      server/core/_service_end.js
  22. +5
    -0
      server/core/_service_error.js
  23. +0
    -0
      server/core/_service_start.js
  24. +7
    -0
      server/package.json
  25. +0
    -0
      server/setup/_end.js
  26. +122
    -0
      server/setup/_schema-form-1-cliente.js
  27. +153
    -0
      server/setup/_schema-form-2-encomenda.js
  28. +92
    -0
      server/setup/_schema-form-3-encomenda_produto.js
  29. +59
    -0
      server/setup/_schema-form-4-pagamento.js
  30. +121
    -0
      server/setup/_schema-form-5-produto.js
  31. +60
    -0
      server/setup/_schema-form-6-produto_tipo.js
  32. +0
    -0
      server/setup/_start.js
  33. +21
    -0
      server/setup/data-001-cliente.js
  34. +26
    -0
      server/setup/data-002-produto-tipo.js
  35. +30
    -0
      server/setup/data-003-produto.js
  36. +33
    -0
      server/setup/data-004-pagamento.js
  37. +22
    -0
      server/setup/data-005-encomenda.js
  38. +28
    -0
      server/setup/data-006-encomenda-produto.js
  39. +24
    -0
      server/templates/dashboard.html
  40. +31
    -0
      server/templates/dev/dashboard.html
  41. +1
    -0
      server/templates/scripts.html
  42. +0
    -0
      server/templates/scripts_dev.html
  43. +0
    -0
      server/templates/scripts_login.html
  44. +1
    -0
      server/templates/styles.html
  45. +1
    -0
      server/templates/styles_dev.html
  46. +0
    -0
      server/templates/styles_login.html
  47. +4
    -0
      storage/filesystem/private/info.txt
  48. +2
    -0
      storage/filesystem/public/info.txt
  49. +4
    -0
      storage/filesystem/server/info.txt
  50. +9
    -0
      ui/.babelrc
  51. +18
    -0
      ui/.gitignore
  52. +24
    -0
      ui/README.md
  53. +37
    -0
      ui/package.json
  54. +20
    -0
      ui/src/components/MyButton/index.js
  55. +59
    -0
      ui/src/containers/DashboardContainer/index.js
  56. +8
    -0
      ui/src/containers/DashboardContainer/index.less
  57. +49
    -0
      ui/src/index.js
  58. +3
    -0
      ui/src/styles/main.less
  59. +84
    -0
      ui/webpack.config.js

+ 7
- 0
.editor.config View File

@ -0,0 +1,7 @@
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2

+ 18
- 0
.gitignore View File

@ -0,0 +1,18 @@
node_modules/
.DS_Store
*.log
.idea/
.metadata/
.vscode
package-lock.json
/trash/*
.Trash
*~*
*#*
config/_development.json
config/_production.json

+ 3
- 0
config/_development.js View File

@ -0,0 +1,3 @@
/*
* Development dynamic configurations is here.
*/

+ 3
- 0
config/_production.js View File

@ -0,0 +1,3 @@
/*
* Production dynamic configurations is here.
*/

BIN
config/icon.png View File

Before After
Width: 1024  |  Height: 1024  |  Size: 68 KiB

BIN
dbs/loja.mv.db View File


+ 147
- 0
dbs/loja.trace.db View File

@ -0,0 +1,147 @@
2023-03-30 20:59:01 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "produto.price" not found; SQL statement:
SELECT
cliente.nome AS cliente,
encomenda.numero AS encomenda,
produto.nome AS produto,
produto.price,
pagamento.nome AS pagamento
FROM cliente
INNER JOIN encomenda ON cliente.id = encomenda.cliente_id
INNER JOIN pagamento ON encomenda.pagamento_id = pagamento.id
INNER JOIN encomenda_produto ON encomenda.id = encomenda_produto.encomenda_id
INNER JOIN produto ON encomenda_produto.produto_id = produto.id [42122-214]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:502)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
at org.h2.message.DbException.get(DbException.java:223)
at org.h2.message.DbException.get(DbException.java:199)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:244)
at org.h2.expression.ExpressionColumn.optimizeOther(ExpressionColumn.java:226)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:213)
at org.h2.command.query.Select.optimizeExpressionsAndPreserveAliases(Select.java:1285)
at org.h2.command.query.Select.prepareExpressions(Select.java:1167)
at org.h2.command.query.Query.prepare(Query.java:218)
at org.h2.command.Parser.prepareCommand(Parser.java:575)
at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:631)
at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:554)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:92)
at org.netuno.tritao.dev.Query._main(SourceFile:58)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.netuno.proteu.Run.execute(SourceFile:119)
at org.netuno.proteu.DynamicURL.build(SourceFile:169)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:417)
at org.netuno.proteu.Enterprise.service(SourceFile:489)
at javax.servlet.http.HttpServlet.service(SourceFile:750)
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(SourceFile:1450)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:799)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:554)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1440)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:505)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1355)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:487)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:732)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:479)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:1034)
at java.base/java.lang.Thread.run(Thread.java:833)
2023-03-30 21:00:05 jdbc[3]: exception
org.h2.jdbc.JdbcSQLSyntaxErrorException: Column "tipo.nome" not found; SQL statement:
SELECT
cliente.nome AS cliente,
encomenda.numero AS encomenda,
produto.nome AS produto,
tipo.nome AS tipo,
produto.preco,
pagamento.nome AS pagamento
FROM cliente
INNER JOIN encomenda ON cliente.id = encomenda.cliente_id
INNER JOIN pagamento ON encomenda.pagamento_id = pagamento.id
INNER JOIN encomenda_produto ON encomenda.id = encomenda_produto.encomenda_id
INNER JOIN produto ON encomenda_produto.produto_id = produto.id
INNER JOIN produto_tipo ON produto.tipo_id = produto_tipo.id [42122-214]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:502)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:477)
at org.h2.message.DbException.get(DbException.java:223)
at org.h2.message.DbException.get(DbException.java:199)
at org.h2.expression.ExpressionColumn.getColumnException(ExpressionColumn.java:244)
at org.h2.expression.ExpressionColumn.optimizeOther(ExpressionColumn.java:226)
at org.h2.expression.ExpressionColumn.optimize(ExpressionColumn.java:213)
at org.h2.expression.Alias.optimize(Alias.java:52)
at org.h2.command.query.Select.optimizeExpressionsAndPreserveAliases(Select.java:1285)
at org.h2.command.query.Select.prepareExpressions(Select.java:1167)
at org.h2.command.query.Query.prepare(Query.java:218)
at org.h2.command.Parser.prepareCommand(Parser.java:575)
at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:631)
at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:554)
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116)
at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:92)
at org.netuno.tritao.dev.Query._main(SourceFile:58)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.netuno.proteu.Run.execute(SourceFile:119)
at org.netuno.proteu.DynamicURL.build(SourceFile:169)
at org.netuno.proteu.Enterprise.processRequest(SourceFile:417)
at org.netuno.proteu.Enterprise.service(SourceFile:489)
at javax.servlet.http.HttpServlet.service(SourceFile:750)
at org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(SourceFile:1450)
at org.eclipse.jetty.servlet.ServletHolder.handle(SourceFile:799)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(SourceFile:554)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SourceFile:600)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:235)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SourceFile:1624)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(SourceFile:233)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(SourceFile:1440)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:188)
at org.eclipse.jetty.servlet.ServletHandler.doScope(SourceFile:505)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SourceFile:1594)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(SourceFile:186)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(SourceFile:1355)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(SourceFile:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(SourceFile:59)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(SourceFile:127)
at org.eclipse.jetty.server.Server.handle(SourceFile:516)
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(SourceFile:487)
at org.eclipse.jetty.server.HttpChannel.dispatch(SourceFile:732)
at org.eclipse.jetty.server.HttpChannel.handle(SourceFile:479)
at org.eclipse.jetty.server.HttpConnection.onFillable(SourceFile:277)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(SourceFile:311)
at org.eclipse.jetty.io.FillInterest.fillable(SourceFile:105)
at org.eclipse.jetty.io.ChannelEndPoint$1.run(SourceFile:104)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(SourceFile:338)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(SourceFile:315)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(SourceFile:173)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(SourceFile:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(SourceFile:409)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(SourceFile:883)
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(SourceFile:1034)
at java.base/java.lang.Thread.run(Thread.java:833)

BIN
public/images/logo-main.png View File

Before After
Width: 740  |  Height: 225  |  Size: 12 KiB

BIN
public/images/logo.png View File

Before After
Width: 600  |  Height: 180  |  Size: 22 KiB

+ 55300
- 0
public/scripts/main.js
File diff suppressed because it is too large
View File


+ 1
- 0
public/scripts/main.js.map
File diff suppressed because it is too large
View File


+ 13
- 0
public/styles/main.css View File

@ -0,0 +1,13 @@
/**
HERE YOUR CUSTOM CSS
**/
.navbar, .navbar-inverse {
background-color: #5b5ce1 !important;
}
.dev .navbar, .dev .navbar-inverse {
background-color: #333333 !important;
}

+ 22
- 0
server/core/_config.js View File

@ -0,0 +1,22 @@
_config.set("_lang", _config.get("_lang:default"))
if (_env.is("dev")
&& (_url.equals("/") || _url.equals("/Index.netuno"))) {
_config
.set("_login:user", "dev")
.set("_login:pass", "dev")
.set("_login:auto", _req.getString("action") != "logout")
}
/**
* DISABLE BROWSER CACHE
*/
if (_url.download.isDownloadable()) {
if (_env.is("dev") && _url.indexOf("/public/scripts/main.js") > 0) {
_header.noCache()
} else {
_header.cache(2628000)
}
}

+ 5
- 0
server/core/_init.js View File

@ -0,0 +1,5 @@
/**
* FIREBASE - Set your listeners
*/
// _firebase.listener("my-test", _header.baseURL() + "/services/firebase/listener/my-test.netuno")

+ 0
- 0
server/core/_request_close.js View File


+ 0
- 0
server/core/_request_end.js View File


+ 17
- 0
server/core/_request_error.js View File

@ -0,0 +1,17 @@
if (!_out.isClosed()) {
_out.print(
"### SERVER ERROR ###"
)
/*
// Is insecure but the code below will print errors with more details...
_out.print(
"SERVER ERROR # " +
_error.data().getString("file")
+":"+
_error.data().getString("line")
+" # "+
_error.data().getString("message")
)
*/
}

+ 2
- 0
server/core/_request_start.js View File

@ -0,0 +1,2 @@
_config.set("_script:_request_end", true)

+ 14
- 0
server/core/_request_url.js View File

@ -0,0 +1,14 @@
// _log.info(_url.url())
/**
* ALLOW CORS
*/
/*
_header.response.set("Access-Control-Allow-Origin", "https://www.netuno.org")
_header.response.set("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS")
_header.response.set("Access-Control-Allow-Headers", "content-type,x-requested-with,authorization")
_header.response.set("Access-Control-Allow-Credentials", true)
*/
_url.to(_url.request())

+ 13
- 0
server/core/_service_config.js View File

@ -0,0 +1,13 @@
/**
* When service need public access...
*/
if (_env.is("dev")) {
_service.allow()
}
/*
if (_service.path == 'samples/my-service') {
_service.allow()
}
*/

+ 0
- 0
server/core/_service_end.js View File


+ 5
- 0
server/core/_service_error.js View File

@ -0,0 +1,5 @@
/*
// Print error:
_log.fatal("Service "+ _service.path, _error.data().get("throwable"))
*/

+ 0
- 0
server/core/_service_start.js View File


+ 7
- 0
server/package.json View File

@ -0,0 +1,7 @@
{
"name": "server",
"version": "1.0.0",
"description": "Server modules dependencies.",
"author": "netuno.org",
"license": "ISC"
}

+ 0
- 0
server/setup/_end.js View File


+ 122
- 0
server/setup/_schema-form-1-cliente.js View File

@ -0,0 +1,122 @@
/**
*
* CODE GENERATED AUTOMATICALLY
*
* THIS FILE SHOULD NOT BE EDITED BY HAND
*
*/
_form.createIfNotExists(
_val.init()
.set("big", false)
.set("control_active", true)
.set("control_group", false)
.set("control_user", false)
.set("description", "")
.set("displayname", "Cliente")
.set("export_id", false)
.set("export_json", true)
.set("export_lastchange", false)
.set("export_uid", true)
.set("export_xls", true)
.set("export_xml", true)
.set("firebase", "")
.set("name", "cliente")
.set("reorder", 0)
.set("report", false)
.set("show_id", true)
.set("uid", "18dd5ede-0af8-446e-950f-0b389009f036")
)
_form.createComponentIfNotExists(
"18dd5ede-0af8-446e-950f-0b389009f036",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "CPF")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "cpf")
.set("notnull", true)
.set("primarykey", true)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "text")
.set("uid", "caa5d2a7-0cbe-4de0-890e-878c5def63ce")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 3)
)
_form.createComponentIfNotExists(
"18dd5ede-0af8-446e-950f-0b389009f036",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Endere\u00E7o")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "endereco")
.set("notnull", false)
.set("primarykey", false)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "text")
.set("uid", "d84d18b3-5f42-48b9-9830-1cce219c3917")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 2)
)
_form.createComponentIfNotExists(
"18dd5ede-0af8-446e-950f-0b389009f036",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Nome")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "nome")
.set("notnull", true)
.set("primarykey", true)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "text")
.set("uid", "d8e77e93-d787-494d-9bdf-df88a9c72848")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 1)
)

+ 153
- 0
server/setup/_schema-form-2-encomenda.js View File

@ -0,0 +1,153 @@
/**
*
* CODE GENERATED AUTOMATICALLY
*
* THIS FILE SHOULD NOT BE EDITED BY HAND
*
*/
_form.createIfNotExists(
_val.init()
.set("big", false)
.set("control_active", true)
.set("control_group", false)
.set("control_user", false)
.set("description", "")
.set("displayname", "Encomenda")
.set("export_id", false)
.set("export_json", true)
.set("export_lastchange", false)
.set("export_uid", true)
.set("export_xls", true)
.set("export_xml", true)
.set("firebase", "")
.set("name", "encomenda")
.set("reorder", 0)
.set("report", false)
.set("show_id", true)
.set("uid", "347a0c7b-4fab-4b2e-bb0d-d750f78a4f5b")
)
_form.createComponentIfNotExists(
"347a0c7b-4fab-4b2e-bb0d-d750f78a4f5b",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Cliente")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "cliente_id")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"cliente:nome,cpf\"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"SERVICE\":{\"default\":\"com/Select.netuno\",\"type\":\"STRING\",\"value\":\"com/Select.netuno\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "select")
.set("uid", "6635ce8a-034d-493b-8b15-ffc889bfdb6c")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 3)
)
_form.createComponentIfNotExists(
"347a0c7b-4fab-4b2e-bb0d-d750f78a4f5b",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Data")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "data")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"DEFAULT_CURRENT\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"true\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "datetime")
.set("uid", "2c915eda-b223-4bff-8447-365ab64763bd")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 2)
)
_form.createComponentIfNotExists(
"347a0c7b-4fab-4b2e-bb0d-d750f78a4f5b",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "N\u00FAmero")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "numero")
.set("notnull", true)
.set("primarykey", true)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "textnum")
.set("uid", "012d49e7-944b-4fb3-a3c4-844c893940f0")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 1)
)
_form.createComponentIfNotExists(
"347a0c7b-4fab-4b2e-bb0d-d750f78a4f5b",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Pagamento")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "pagamento_id")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"pagamento:nome\"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"SERVICE\":{\"default\":\"com/Select.netuno\",\"type\":\"STRING\",\"value\":\"com/Select.netuno\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "select")
.set("uid", "1070c997-84fc-4007-93fc-3864fa965671")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 4)
)

+ 92
- 0
server/setup/_schema-form-3-encomenda_produto.js View File

@ -0,0 +1,92 @@
/**
*
* CODE GENERATED AUTOMATICALLY
*
* THIS FILE SHOULD NOT BE EDITED BY HAND
*
*/
_form.createIfNotExists(
_val.init()
.set("big", false)
.set("control_active", true)
.set("control_group", false)
.set("control_user", false)
.set("description", "")
.set("displayname", "Produto")
.set("export_id", false)
.set("export_json", true)
.set("export_lastchange", false)
.set("export_uid", true)
.set("export_xls", true)
.set("export_xml", true)
.set("firebase", "")
.set("name", "encomenda_produto")
.set("parent_uid", "347a0c7b-4fab-4b2e-bb0d-d750f78a4f5b")
.set("reorder", 0)
.set("report", false)
.set("show_id", true)
.set("uid", "90af9ceb-24a6-4fd8-9eb7-8a7897022070")
)
_form.createComponentIfNotExists(
"90af9ceb-24a6-4fd8-9eb7-8a7897022070",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Encomenda")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "encomenda_id")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"encomenda:numero,cliente_id,data,pagamento_id\"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"SERVICE\":{\"default\":\"com/Select.netuno\",\"type\":\"STRING\",\"value\":\"com/Select.netuno\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "select")
.set("uid", "eda73459-b6d6-427c-acfa-a0e623864e9a")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 1)
)
_form.createComponentIfNotExists(
"90af9ceb-24a6-4fd8-9eb7-8a7897022070",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Produto")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "produto_id")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"produto:nome,tipo_id,preco\"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"SERVICE\":{\"default\":\"com/Select.netuno\",\"type\":\"STRING\",\"value\":\"com/Select.netuno\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "select")
.set("uid", "80a21619-7f30-412e-aada-561325ce1cfe")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 2)
)

+ 59
- 0
server/setup/_schema-form-4-pagamento.js View File

@ -0,0 +1,59 @@
/**
*
* CODE GENERATED AUTOMATICALLY
*
* THIS FILE SHOULD NOT BE EDITED BY HAND
*
*/
_form.createIfNotExists(
_val.init()
.set("big", false)
.set("control_active", true)
.set("control_group", false)
.set("control_user", false)
.set("description", "")
.set("displayname", "Pagamento")
.set("export_id", false)
.set("export_json", true)
.set("export_lastchange", false)
.set("export_uid", true)
.set("export_xls", true)
.set("export_xml", true)
.set("firebase", "")
.set("name", "pagamento")
.set("reorder", 0)
.set("report", false)
.set("show_id", true)
.set("uid", "67375db4-26f3-43df-be6b-e454c8db50b2")
)
_form.createComponentIfNotExists(
"67375db4-26f3-43df-be6b-e454c8db50b2",
_val.init()
.set("colspan", 0)
.set("displayname", "Nome")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "nome")
.set("notnull", true)
.set("primarykey", true)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "text")
.set("uid", "7ce35078-d995-4b27-a1c9-66e74435f27c")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 1)
)

+ 121
- 0
server/setup/_schema-form-5-produto.js View File

@ -0,0 +1,121 @@
/**
*
* CODE GENERATED AUTOMATICALLY
*
* THIS FILE SHOULD NOT BE EDITED BY HAND
*
*/
_form.createIfNotExists(
_val.init()
.set("big", false)
.set("control_active", true)
.set("control_group", false)
.set("control_user", false)
.set("description", "")
.set("displayname", "Produto")
.set("export_id", false)
.set("export_json", true)
.set("export_lastchange", false)
.set("export_uid", true)
.set("export_xls", true)
.set("export_xml", true)
.set("firebase", "")
.set("name", "produto")
.set("reorder", 0)
.set("report", false)
.set("show_id", true)
.set("uid", "241b181e-cdce-4ce0-9595-96323183001a")
)
_form.createComponentIfNotExists(
"241b181e-cdce-4ce0-9595-96323183001a",
_val.init()
.set("colspan", 0)
.set("displayname", "Nome")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "nome")
.set("notnull", true)
.set("primarykey", true)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "text")
.set("uid", "0fb16184-de7d-4dea-9a32-92cceb0cf3be")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 1)
)
_form.createComponentIfNotExists(
"241b181e-cdce-4ce0-9595-96323183001a",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Pre\u00E7o")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "preco")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"MASK\":{\"default\":\"#.##0,00\",\"type\":\"STRING\",\"value\":\"#.##0,00\"},\"MASK_REVERSE\":{\"default\":\"true\",\"type\":\"BOOLEAN\",\"value\":\"true\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "textfloat")
.set("uid", "f427e77e-d35d-4a17-be2c-433833d78c61")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 3)
)
_form.createComponentIfNotExists(
"241b181e-cdce-4ce0-9595-96323183001a",
_val.init()
.set("colspan", 0)
.set("description", "")
.set("displayname", "Tipo")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "tipo_id")
.set("notnull", true)
.set("primarykey", false)
.set("properties", "{\"COLUMN_SEPARATOR\":{\"default\":\" - \",\"type\":\"LINK_SEPARATOR\",\"value\":\" - \"},\"LINK\":{\"default\":\"\",\"type\":\"LINK\",\"value\":\"produto_tipo:nome\"},\"MAX_COLUMN_LENGTH\":{\"default\":\"0\",\"type\":\"INTEGER\",\"value\":\"0\"},\"ONLY_ACTIVES\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"SERVICE\":{\"default\":\"com/Select.netuno\",\"type\":\"STRING\",\"value\":\"com/Select.netuno\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "select")
.set("uid", "47f4766f-22f4-468c-87e5-d24a46bb23b5")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 2)
)

+ 60
- 0
server/setup/_schema-form-6-produto_tipo.js View File

@ -0,0 +1,60 @@
/**
*
* CODE GENERATED AUTOMATICALLY
*
* THIS FILE SHOULD NOT BE EDITED BY HAND
*
*/
_form.createIfNotExists(
_val.init()
.set("big", false)
.set("control_active", true)
.set("control_group", false)
.set("control_user", false)
.set("description", "")
.set("displayname", "Tipo")
.set("export_id", false)
.set("export_json", true)
.set("export_lastchange", false)
.set("export_uid", true)
.set("export_xls", true)
.set("export_xml", true)
.set("firebase", "")
.set("name", "produto_tipo")
.set("parent_uid", "241b181e-cdce-4ce0-9595-96323183001a")
.set("reorder", 0)
.set("report", false)
.set("show_id", true)
.set("uid", "1ddb6049-a8da-4f6a-9d20-15783cf1bbb8")
)
_form.createComponentIfNotExists(
"1ddb6049-a8da-4f6a-9d20-15783cf1bbb8",
_val.init()
.set("colspan", 0)
.set("displayname", "Nome")
.set("firebase", "")
.set("group_id", 0)
.set("height", 0)
.set("max", 0)
.set("min", 0)
.set("name", "nome")
.set("notnull", true)
.set("primarykey", true)
.set("properties", "{\"MASK\":{\"default\":\"\",\"type\":\"STRING\",\"value\":\"\"},\"MASK_REVERSE\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"},\"MASK_SELECTONFOCUS\":{\"default\":\"false\",\"type\":\"BOOLEAN\",\"value\":\"false\"}}")
.set("rowspan", 0)
.set("tdheight", 0)
.set("tdwidth", 0)
.set("type", "text")
.set("uid", "b1917d4f-83ff-4c61-a660-d7b99eeeeca6")
.set("user_id", 0)
.set("whenedit", true)
.set("whenexport", true)
.set("whenfilter", true)
.set("whennew", true)
.set("whenresult", true)
.set("whenview", true)
.set("width", 0)
.set("x", 1)
.set("y", 1)
)

+ 0
- 0
server/setup/_start.js View File


+ 21
- 0
server/setup/data-001-cliente.js View File

@ -0,0 +1,21 @@
// -----------------------------------------------------------
//
// CLIENTE
//
// -----------------------------------------------------------
//
// CODE GENERATED AUTOMATICALLY
//
_db.insertIfNotExists(
"cliente",
_val.init()
.set("uid", "343fae8a-3819-4371-aa93-71534a569484")
.set("nome", "Maria Silva")
.set("endereco", "Rua Plim plim...")
.set("cpf", "999.999.999-11")
);

+ 26
- 0
server/setup/data-002-produto-tipo.js View File

@ -0,0 +1,26 @@
// -----------------------------------------------------------
//
// PRODUTO_TIPO
//
// -----------------------------------------------------------
//
// CODE GENERATED AUTOMATICALLY
//
_db.insertIfNotExists(
"produto_tipo",
_val.init()
.set("uid", "69cb2769-7c84-4dcc-8bbe-97d96a4143a4")
.set("nome", "Jeans")
);
_db.insertIfNotExists(
"produto_tipo",
_val.init()
.set("uid", "140888f9-4d5f-42d7-be7e-f3443bc2af89")
.set("nome", "Algod\u00E3o")
);

+ 30
- 0
server/setup/data-003-produto.js View File

@ -0,0 +1,30 @@
// -----------------------------------------------------------
//
// PRODUTO
//
// -----------------------------------------------------------
//
// CODE GENERATED AUTOMATICALLY
//
_db.insertIfNotExists(
"produto",
_val.init()
.set("uid", "f2f1d1f7-daa0-496b-a414-8191550ffe59")
.set("nome", "Cal\u00E7a")
.set("tipo_id", "69cb2769-7c84-4dcc-8bbe-97d96a4143a4")
.set("preco", 150.0)
);
_db.insertIfNotExists(
"produto",
_val.init()
.set("uid", "168b7953-dfec-4ee7-b3b3-70da932012f7")
.set("nome", "Blusa")
.set("tipo_id", "140888f9-4d5f-42d7-be7e-f3443bc2af89")
.set("preco", 100.0)
);

+ 33
- 0
server/setup/data-004-pagamento.js View File

@ -0,0 +1,33 @@
// -----------------------------------------------------------
//
// PAGAMENTO
//
// -----------------------------------------------------------
//
// CODE GENERATED AUTOMATICALLY
//
_db.insertIfNotExists(
"pagamento",
_val.init()
.set("uid", "77f9b0c8-12bd-435f-a86f-8134584bcb21")
.set("nome", "PIX")
);
_db.insertIfNotExists(
"pagamento",
_val.init()
.set("uid", "02ed2880-674f-4cc6-8975-aa4e9d36eed0")
.set("nome", "CC")
);
_db.insertIfNotExists(
"pagamento",
_val.init()
.set("uid", "b11a6632-39ed-4b9b-9a8c-ae60676f241d")
.set("nome", "Boleto")
);

+ 22
- 0
server/setup/data-005-encomenda.js View File

@ -0,0 +1,22 @@
// -----------------------------------------------------------
//
// ENCOMENDA
//
// -----------------------------------------------------------
//
// CODE GENERATED AUTOMATICALLY
//
_db.insertIfNotExists(
"encomenda",
_val.init()
.set("uid", "b288aa97-8f79-440e-b446-f02c8bea6f62")
.set("numero", 501)
.set("data", _db.timestamp("2023-03-30 20:45:25.0"))
.set("cliente_id", "343fae8a-3819-4371-aa93-71534a569484")
.set("pagamento_id", "77f9b0c8-12bd-435f-a86f-8134584bcb21")
);

+ 28
- 0
server/setup/data-006-encomenda-produto.js View File

@ -0,0 +1,28 @@
// -----------------------------------------------------------
//
// ENCOMENDA_PRODUTO
//
// -----------------------------------------------------------
//
// CODE GENERATED AUTOMATICALLY
//
_db.insertIfNotExists(
"encomenda_produto",
_val.init()
.set("uid", "093a6944-d60d-408b-a064-13415ca1efb1")
.set("encomenda_id", "b288aa97-8f79-440e-b446-f02c8bea6f62")
.set("produto_id", "f2f1d1f7-daa0-496b-a414-8191550ffe59")
);
_db.insertIfNotExists(
"encomenda_produto",
_val.init()
.set("uid", "a3224ed6-fdf5-49fc-af17-0ffe831f8140")
.set("encomenda_id", "b288aa97-8f79-440e-b446-f02c8bea6f62")
.set("produto_id", "168b7953-dfec-4ee7-b3b3-70da932012f7")
);

+ 24
- 0
server/templates/dashboard.html View File

@ -0,0 +1,24 @@
<div class="row">
<div class="col-lg-12">
<div class="with-form">
<h1 class="page-header">
_{&lang=netuno.main.dashboard.title}
</h1>
</div>
<div class="no-form">
<h1 class="page-header">
_{&lang=netuno.main.dashboard.welcome_netuno}
</h1>
<p>_{&lang=netuno.main.dashboard.you_not_form}</p>
<p>_{&lang=netuno.main.dashboard.you_can_start_by_clicking_top_bar}</p>
<br>
<img src="_{netuno-config=url-styles}/build-button-tutorial.png" height="80">
</div>
</div>
</div>
<div id="app-dashboard"></div>

+ 31
- 0
server/templates/dev/dashboard.html View File

@ -0,0 +1,31 @@
<div class="row">
<div class="col-lg-12">
<div class="with-form">
<h1 class="page-header">
_{&lang=netuno.main.dashboard.title}
</h1>
<p>_{&lang=netuno.main.dashboard.description}</p>
</div>
<div class="no-form">
<h1 class="page-header">
_{&lang=netuno.main.dashboard.welcome_netuno}
</h1>
<p>_{&lang=netuno.dev.main.you_not_form}</p>
<p>_{&lang=netuno.dev.main.you_can_start_by_clicking_top_bar}</p>
<br>
<img src="_{netuno-config=url-styles}/build-button-tutorial-dev.png" height="200">
</div>
#macro(listFormItems $items)
<ul>
#foreach($item in $items)
<li>
<a href="#" netuno-dev-form="$item.getString('name')">$item.getString('text')</a>
#listFormItems($item.get('items'))
</li>
#end
</ul>
#end
#listFormItems($data.get('menu').get('forms'))
</div>
</div>

+ 1
- 0
server/templates/scripts.html View File

@ -0,0 +1 @@
<script src="_{netuno-config=url-app-scripts}/main.js?_{util=requestuuid}"></script>

+ 0
- 0
server/templates/scripts_dev.html View File


+ 0
- 0
server/templates/scripts_login.html View File


+ 1
- 0
server/templates/styles.html View File

@ -0,0 +1 @@
<link href='_{netuno-config=url-app-styles}/main.css' rel='stylesheet' />

+ 1
- 0
server/templates/styles_dev.html View File

@ -0,0 +1 @@
<link href='_{netuno-config=url-app-styles}/main.css' rel='stylesheet' />

+ 0
- 0
server/templates/styles_login.html View File


+ 4
- 0
storage/filesystem/private/info.txt View File

@ -0,0 +1,4 @@
Secure data files comes here...
Only accessible for logged users!

+ 2
- 0
storage/filesystem/public/info.txt View File

@ -0,0 +1,2 @@
Public storage files comes here...

+ 4
- 0
storage/filesystem/server/info.txt View File

@ -0,0 +1,4 @@
Secure data files comes here...
Only accessible through server side!

+ 9
- 0
ui/.babelrc View File

@ -0,0 +1,9 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
["import", { "libraryName": "antd", "style": "less" } ]
]
}

+ 18
- 0
ui/.gitignore View File

@ -0,0 +1,18 @@
node_modules/
.DS_Store
*.log
.idea/
.metadata/
.vscode
package-lock.json
yarn.lock
.Trash
*~*
*#*

+ 24
- 0
ui/README.md View File

@ -0,0 +1,24 @@
### Install Packages
`npm install`
### Watch changes and auto recompile
`npm run watch`
### Installation requirements
On Windows with an Administrator terminal, run:
```
npm install --global --production windows-build-tools
npm install --global node-gyp
```
With others Python version, then configure the Python 2.7 path:
```
node-gyp --python /path/to/python2.7
npm config set python /path/to/executable/python2.7
```

+ 37
- 0
ui/package.json View File

@ -0,0 +1,37 @@
{
"name": "ui",
"version": "1.0.0",
"description": "",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --mode production",
"watch": "webpack --mode development --watch"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.20.12",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"babel-loader": "^9.1.2",
"babel-plugin-import": "^1.13.6",
"css-loader": "^6.7.3",
"less": "^4.1.3",
"less-loader": "^11.1.0",
"prop-types": "^15.8.1",
"style-loader": "^3.3.1",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1"
},
"dependencies": {
"@ant-design/icons": "^5.0.1",
"@netuno/service-client": "^1.2.0",
"@netuno/ws-client": "^1.0.8",
"antd": "^5.3.2",
"chart.js": "^4.2.0",
"react-chartjs-2": "^5.2.0"
}
}

+ 20
- 0
ui/src/components/MyButton/index.js View File

@ -0,0 +1,20 @@
import React from "react";
import PropTypes from "prop-types";
import { Button } from 'antd';
function MyButton({ text, onClick }) {
return (
<div>
<Button type="primary" onClick={ onClick }>
{ text }
</Button>
</div>
);
};
MyButton.propTypes = {
text: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired
};
export default MyButton;

+ 59
- 0
ui/src/containers/DashboardContainer/index.js View File

@ -0,0 +1,59 @@
import React, { useState, useEffect, useRef } from "react";
import { ConfigProvider, theme } from "antd";
import antLocale_enGB from "antd/lib/locale/en_GB";
import antLocale_enUS from "antd/lib/locale/en_US";
import antLocale_esES from "antd/lib/locale/es_ES";
import antLocale_ptBR from "antd/lib/locale/pt_BR";
import antLocale_ptPT from "antd/lib/locale/pt_PT";
import MyButton from "../../components/MyButton";
import "./index.less";
const antdVariables = {
colorPrimary: '#5b5ce1',
colorLink: '#5b5ce1',
borderRadius: 5,
};
function DashboardContainer() {
const [counter, setCounter] = useState(0);
const refButton = useRef();
useEffect(() => {
$(refButton.current).fadeOut(250).fadeIn(250);
}, [counter]);
const onClick = () => {
setCounter(counter + 1);
};
return (
<ConfigProvider
theme={{
token: antdVariables,
algorithm: theme.darkAlgorithm
}}
locale={
{
'en_us': antLocale_enUS,
'en_gb': antLocale_enGB,
'es_es': antLocale_esES,
'pt_br': antLocale_ptBR,
'pt_pt': antLocale_ptPT
}[netuno.config.langCode]
}
>
<div className="my-dashboard">
<div ref={refButton} className="my-dashboard__button">
<MyButton text={`ReactJS ⚡ Ant.Design 👉 Click me! ${counter}`} onClick={onClick} />
</div>
</div>
</ConfigProvider>
);
}
export default DashboardContainer;

+ 8
- 0
ui/src/containers/DashboardContainer/index.less View File

@ -0,0 +1,8 @@
.my-dashboard {
width: 100%;
&__button {
padding: 80px;
text-align: center;
}
}

+ 49
- 0
ui/src/index.js View File

@ -0,0 +1,49 @@
import React from "react";
import ReactDOM from "react-dom/client";
import _service from '@netuno/service-client';
import DashboardContainer from "./containers/DashboardContainer";
_service.config({
prefix: netuno.config.urlServices
});
const dashboardDiv = document.getElementById("app-dashboard");
const dashboardContainer = dashboardDiv ? ReactDOM.createRoot(dashboardDiv) : false;
if (dashboardContainer) {
dashboardContainer.render(<DashboardContainer/>);
}
netuno.addNavigationLoad(() => {
$('[netuno-navigation]').find('a').on('netuno:click', (e)=> {
const link = $(e.target);
if (dashboardContainer && link.is('[netuno-navigation-dashboard]')) {
// Menu > Dashboard > Clicked!
}
});
});
netuno.addContentLoad((container) => {
// When any content is loaded dinamically this is executed...
if (container.is('[netuno-form-search="YOUR_FORM_NAME"]')) {
// When search page is loaded...
} else if (container.is('[netuno-form-edit="YOUR_FORM_NAME"]')) {
// When form edit is loaded...
}
});
netuno.addPageLoad(() => {
// When page is loaded...
let modal = $('#app-dashboard-modal-form');
modal.on('hidden.bs.modal', ()=> {
modal.find('[netuno-form-edit]').empty();
});
$('#app-dashboard-modal-form-button').on('click', ()=> {
modal.modal('show');
netuno.loadFormEdit(modal.find('[netuno-form]'));
});
modal.find('[netuno-form]').on('netuno:save', ()=> {
modal.modal('hide');
});
});

+ 3
- 0
ui/src/styles/main.less View File

@ -0,0 +1,3 @@
/*** GLOBAL CSS ***/

+ 84
- 0
ui/webpack.config.js View File

@ -0,0 +1,84 @@
const path = require('path');
module.exports = {
entry: [ './src/index.js', './src/styles/main.less' ],
devtool: "source-map",
output: {
path: __dirname +'/../public/scripts',
filename: 'main.js'
},
module: {
rules: [
{
test: /\.jsx$/,
include: [
path.resolve(__dirname, 'src')
],
exclude: [/node_modules/],
use: [{
loader: 'babel-loader'
}]
},
{
test: /\.js$/,
include: [
path.resolve(__dirname, 'src')
],
exclude: [/node_modules/],
use: [{
loader: 'babel-loader'
}]
},
{
test: /\.css$/,
include: [
path.resolve(__dirname, 'src')
],
exclude: [/node_modules/],
use: [
'style-loader',
'css-loader'
]
},
{
test: /\.less$/,
include: [
path.resolve(__dirname, 'src')
],
exclude: [/node_modules/],
use: [
{
loader: 'style-loader' // creates style nodes from JS strings
},
{
loader: 'css-loader', // translates CSS into CommonJ,
options: {
sourceMap: true
/*,
modules: {
mode: 'local',
localIdentName: "[local]___[hash:base64:5]",
context: path.resolve(__dirname, 'src'),
hashPrefix: 'app',
}*/
}
},
{
loader: 'less-loader', // compiles Less to CSS
options: {
lessOptions: {
modifyVars: {
'@primary-color': '#5b5ce1',
'@link-color': '#5b5ce1',
'@border-radius-base': '5px'
},
javascriptEnabled: true
},
sourceMap: true
}
}
]
}
]
}
};

Loading…
Cancel
Save