From e55637d7885566c7d8e45f58b76ca5f3541862cb Mon Sep 17 00:00:00 2001 From: Zoey de Souza Pessanha Date: Fri, 10 Nov 2023 10:46:16 -0300 Subject: [PATCH 1/4] =?UTF-8?q?atualiza=20depend=C3=AAncias?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .tool-versions | 4 +-- flake.lock | 12 ++++----- flake.nix | 65 ++++++++++++++++++++-------------------------- mix.lock | 70 +++++++++++++++++++++++++------------------------- 4 files changed, 70 insertions(+), 81 deletions(-) diff --git a/.tool-versions b/.tool-versions index cdd860ce..cdc63558 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ -erlang 25.2.2 -elixir 1.14.2 +erlang 26.1.2 +elixir 1.15.7 postgres 14.6 diff --git a/flake.lock b/flake.lock index b4c2861c..092b1998 100644 --- a/flake.lock +++ b/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1687466461, - "narHash": "sha256-oupXI7g7RPzlpGUfAu1xG4KBK53GrZH8/xeKgKDB4+Q=", + "lastModified": 1699343069, + "narHash": "sha256-s7BBhyLA6MI6FuJgs4F/SgpntHBzz40/qV0xLPW6A1Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ecb441f22067ba1d6312f4932a7c64efa8d19a7b", + "rev": "ec750fd01963ab6b20ee1f0cb488754e8036d89d", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-23.05", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, "root": { diff --git a/flake.nix b/flake.nix index ad77d888..03b5111c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,6 @@ { description = "Plataforma Digital PEA Pescarte"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; - outputs = {nixpkgs, ...}: let systems = { linux = "x86_64-linux"; @@ -14,31 +12,6 @@ inherit system; config.allowUnfree = true; }; - - inputs = sys: - with pkgs sys; - [ - gnumake - gcc - readline - openssl - zlib - libxml2 - curl - libiconv - elixir - glibcLocales - postgresql_15 - nodejs_18 - ] - ++ lib.optional stdenv.isLinux [ - inotify-tools - gtk-engine-murrine - ] - ++ lib.optional stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreServices - darwin.apple_sdk.frameworks.CoreFoundation - ]; in { packages = { "${systems.darwin}".default = let @@ -52,18 +25,36 @@ }; }; - devShells = { - "${systems.linux}".default = with pkgs systems.linux; - mkShell { - name = "pescarte"; - packages = inputs systems.linux; - }; - - "${systems.darwin}".default = with pkgs systems.darwin; - mkShell { + devShells = let + mkShell = pkgs: let + inherit (pkgs.beam.packages) erlang_26; + in + pkgs.mkShell { name = "pescarte"; - packages = inputs systems.darwin; + packages = with pkgs; + [ + gnumake + gcc + openssl + zlib + libxml2 + libiconv + erlang_26.elixir + postgresql_15 + nodejs_18 + ] + ++ lib.optional stdenv.isLinux [ + inotify-tools + gtk-engine-murrine + ] + ++ lib.optional stdenv.isDarwin [ + darwin.apple_sdk.frameworks.CoreServices + darwin.apple_sdk.frameworks.CoreFoundation + ]; }; + in { + "${systems.linux}".default = mkShell (pkgs systems.linux); + "${systems.darwin}".default = mkShell (pkgs systems.darwin); }; }; } diff --git a/mix.lock b/mix.lock index d2f3502f..5753ddc2 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,5 @@ %{ - "absinthe": {:hex, :absinthe, "1.7.3", "128f9de8d8feab761a50483011c2652074de0a670316d0e24a4979daeb460c8f", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 1.2.2 or ~> 1.3.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:opentelemetry_process_propagator, "~> 0.2.1", [hex: :opentelemetry_process_propagator, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6def91514f023832dbb3433baa166366881648932211f2e8146f9792b08b7bb3"}, + "absinthe": {:hex, :absinthe, "1.7.0", "36819e7b1fd5046c9c734f27fe7e564aed3bda59f0354c37cd2df88fd32dd014", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "566a5b5519afc9b29c4d367f0c6768162de3ec03e9bf9916f9dc2bcbe7c09643"}, "absinthe_phoenix": {:hex, :absinthe_phoenix, "2.0.2", "e607b438db900049b9b3760f8ecd0591017a46122fffed7057bf6989020992b5", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.5", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.5", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.13 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}], "hexpm", "d36918925c380dc7d2ed7d039c9a3b4182ec36723f7417a68745ade5aab22f8d"}, "absinthe_plug": {:hex, :absinthe_plug, "1.5.8", "38d230641ba9dca8f72f1fed2dfc8abd53b3907d1996363da32434ab6ee5d6ab", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "bbb04176647b735828861e7b2705465e53e2cf54ccf5a73ddd1ebd855f996e5a"}, "bandit": {:hex, :bandit, "0.7.7", "48456d09022607a312cf723a91992236aeaffe4af50615e6e2d2e383fb6bef10", [:mix], [{:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:thousand_island, "~> 0.6.7", [hex: :thousand_island, repo: "hexpm", optional: false]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "772f0a32632c2ce41026d85e24b13a469151bb8cea1891e597fb38fde103640a"}, @@ -7,28 +7,28 @@ "blankable": {:hex, :blankable, "1.0.0", "89ab564a63c55af117e115144e3b3b57eb53ad43ba0f15553357eb283e0ed425", [:mix], [], "hexpm", "7cf11aac0e44f4eedbee0c15c1d37d94c090cb72a8d9fddf9f7aec30f9278899"}, "brcpfcnpj": {:hex, :brcpfcnpj, "1.0.0", "23319e5f7e4da533f36dc5b7793e7c505fd80e43b0fa720c7a459daffbaa5034", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm", "8e6f38910896ea4f39b75c37855a702cebd495c2a74d88cdfd5c3c715c871510"}, "bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"}, - "castore": {:hex, :castore, "1.0.3", "7130ba6d24c8424014194676d608cb989f62ef8039efd50ff4b3f33286d06db8", [:mix], [], "hexpm", "680ab01ef5d15b161ed6a95449fac5c6b8f60055677a8e79acf01b27baa4390b"}, - "certifi": {:hex, :certifi, "2.9.0", "6f2a475689dd47f19fb74334859d460a2dc4e3252a3324bd2111b8f0429e7e21", [:rebar3], [], "hexpm", "266da46bdb06d6c6d35fde799bcb28d36d985d424ad7c08b5bb48f5b5cdd4641"}, + "castore": {:hex, :castore, "1.0.4", "ff4d0fb2e6411c0479b1d965a814ea6d00e51eb2f58697446e9c41a97d940b28", [:mix], [], "hexpm", "9418c1b8144e11656f0be99943db4caf04612e3eaecefb5dae9a2a87565584f8"}, + "certifi": {:hex, :certifi, "2.12.0", "2d1cca2ec95f59643862af91f001478c9863c2ac9cb6e2f89780bfd8de987329", [:rebar3], [], "hexpm", "ee68d85df22e554040cdb4be100f33873ac6051387baf6a8f6ce82272340ff1c"}, "combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"}, - "comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"}, + "comeonin": {:hex, :comeonin, "5.4.0", "246a56ca3f41d404380fc6465650ddaa532c7f98be4bda1b4656b3a37cc13abe", [:mix], [], "hexpm", "796393a9e50d01999d56b7b8420ab0481a7538d0caf80919da493b4a6e51faf1"}, "cowboy": {:hex, :cowboy, "2.10.0", "ff9ffeff91dae4ae270dd975642997afe2a1179d94b1887863e43f681a203e26", [:make, :rebar3], [{:cowlib, "2.12.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "3afdccb7183cc6f143cb14d3cf51fa00e53db9ec80cdcd525482f5e99bc41d6b"}, "cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"}, "cowlib": {:hex, :cowlib, "2.12.1", "a9fa9a625f1d2025fe6b462cb865881329b5caff8f1854d1cbc9f9533f00e1e1", [:make, :rebar3], [], "hexpm", "163b73f6367a7341b33c794c4e88e7dbfe6498ac42dcd69ef44c5bc5507c8db0"}, "crawly": {:hex, :crawly, "0.15.0", "dd8588d65c808ef96c7df120b9d5d832632336dbf217642c87d6156b5a39cf46", [:mix], [{:elixir_uuid, "~> 1.2", [hex: :elixir_uuid, repo: "hexpm", optional: false]}, {:ex_json_schema, "~> 0.9.2", [hex: :ex_json_schema, repo: "hexpm", optional: false]}, {:gollum, "~> 0.4.0", [hex: :new_gollum, repo: "hexpm", optional: false]}, {:httpoison, "~> 1.7", [hex: :httpoison, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.0", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:poison, "~> 3.1", [hex: :poison, repo: "hexpm", optional: false]}, {:yaml_elixir, "~> 2.9", [hex: :yaml_elixir, repo: "hexpm", optional: false]}], "hexpm", "2f53162b6f0de8e5d2fc2532b5b83a5dc944ed00d1fa8515924c77957af4bba4"}, - "credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"}, + "credo": {:hex, :credo, "1.7.1", "6e26bbcc9e22eefbff7e43188e69924e78818e2fe6282487d0703652bc20fd62", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "e9871c6095a4c0381c89b6aa98bc6260a8ba6addccf7f6a53da8849c748a58a2"}, "dart_sass": {:hex, :dart_sass, "0.7.0", "7979e056cb74fd6843e1c72db763cffc7726a9192a657735b7d24c0d9c26a1ce", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "4a8e70bca41aa00846398abdf5ad8a64d7907a0f7bf40145cd2e40d5971629f2"}, - "db_connection": {:hex, :db_connection, "2.5.0", "bb6d4f30d35ded97b29fe80d8bd6f928a1912ca1ff110831edcd238a1973652c", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c92d5ba26cd69ead1ff7582dbb860adeedfff39774105a4f1c92cbb654b55aa2"}, + "db_connection": {:hex, :db_connection, "2.6.0", "77d835c472b5b67fc4f29556dee74bf511bbafecdcaf98c27d27fa5918152086", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c2f992d15725e721ec7fbc1189d4ecdb8afef76648c746a8e1cad35e3b8a35f3"}, "decimal": {:hex, :decimal, "2.1.1", "5611dca5d4b2c3dd497dec8f68751f1f1a54755e8ed2a966c2633cf885973ad6", [:mix], [], "hexpm", "53cfe5f497ed0e7771ae1a475575603d77425099ba5faef9394932b35020ffcc"}, - "dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"}, - "earmark": {:hex, :earmark, "1.4.38", "ba8fda946c259c6e8f6759d3647d448e9216e2c0afed8c6ae7f8ce1f7072a497", [:mix], [{:earmark_parser, "~> 1.4.32", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "f938e30de4167e7d8f3bf588b01dc041138278dda1e5a13fb9ec89b43dd5ec7f"}, - "earmark_parser": {:hex, :earmark_parser, "1.4.33", "3c3fd9673bb5dcc9edc28dd90f50c87ce506d1f71b70e3de69aa8154bc695d44", [:mix], [], "hexpm", "2d526833729b59b9fdb85785078697c72ac5e5066350663e5be6a1182da61b8f"}, - "ecto": {:hex, :ecto, "3.10.2", "6b887160281a61aa16843e47735b8a266caa437f80588c3ab80a8a960e6abe37", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "6a895778f0d7648a4b34b486af59a1c8009041fbdf2b17f1ac215eb829c60235"}, - "ecto_sql": {:hex, :ecto_sql, "3.10.1", "6ea6b3036a0b0ca94c2a02613fd9f742614b5cfe494c41af2e6571bb034dd94c", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f6a25bdbbd695f12c8171eaff0851fa4c8e72eec1e98c7364402dda9ce11c56b"}, + "dialyxir": {:hex, :dialyxir, "1.4.2", "764a6e8e7a354f0ba95d58418178d486065ead1f69ad89782817c296d0d746a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "516603d8067b2fd585319e4b13d3674ad4f314a5902ba8130cd97dc902ce6bbd"}, + "earmark": {:hex, :earmark, "1.4.46", "8c7287bd3137e99d26ae4643e5b7ef2129a260e3dcf41f251750cb4563c8fb81", [:mix], [], "hexpm", "798d86db3d79964e759ddc0c077d5eb254968ed426399fbf5a62de2b5ff8910a"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.38", "b42252eddf63bda05554ba8be93a1262dc0920c721f1aaf989f5de0f73a2e367", [:mix], [], "hexpm", "2cd0907795aaef0c7e8442e376633c5b3bd6edc8dbbdc539b22f095501c1cdb6"}, + "ecto": {:hex, :ecto, "3.10.3", "eb2ae2eecd210b4eb8bece1217b297ad4ff824b4384c0e3fdd28aaf96edd6135", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "44bec74e2364d491d70f7e42cd0d690922659d329f6465e89feb8a34e8cd3433"}, + "ecto_sql": {:hex, :ecto_sql, "3.10.2", "6b98b46534b5c2f8b8b5f03f126e75e2a73c64f3c071149d32987a5378b0fdbd", [:mix], [{:db_connection, "~> 2.4.1 or ~> 2.5", [hex: :db_connection, repo: "hexpm", optional: false]}, {:ecto, "~> 3.10.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:myxql, "~> 0.6.0", [hex: :myxql, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.16.0 or ~> 0.17.0 or ~> 1.0", [hex: :postgrex, repo: "hexpm", optional: true]}, {:tds, "~> 2.1.1 or ~> 2.2", [hex: :tds, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "68c018debca57cb9235e3889affdaec7a10616a4e3a80c99fa1d01fdafaa9007"}, "elixir_make": {:hex, :elixir_make, "0.7.7", "7128c60c2476019ed978210c245badf08b03dbec4f24d05790ef791da11aa17c", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "5bc19fff950fad52bbe5f211b12db9ec82c6b34a9647da0c2224b8b8464c7e6c"}, "elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm", "f7eba2ea6c3555cea09706492716b0d87397b88946e6380898c2889d68585752"}, "erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"}, - "esbuild": {:hex, :esbuild, "0.7.1", "fa0947e8c3c3c2f86c9bf7e791a0a385007ccd42b86885e8e893bdb6631f5169", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "66661cdf70b1378ee4dc16573fcee67750b59761b2605a0207c267ab9d19f13c"}, - "ex_doc": {:hex, :ex_doc, "0.30.3", "bfca4d340e3b95f2eb26e72e4890da83e2b3a5c5b0e52607333bf5017284b063", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "fbc8702046c1d25edf79de376297e608ac78cdc3a29f075484773ad1718918b6"}, + "esbuild": {:hex, :esbuild, "0.8.1", "0cbf919f0eccb136d2eeef0df49c4acf55336de864e63594adcea3814f3edf41", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "25fc876a67c13cb0a776e7b5d7974851556baeda2085296c14ab48555ea7560f"}, + "ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"}, "ex_json_schema": {:hex, :ex_json_schema, "0.9.3", "fc17c50d410fd99fa6e814e1aed60122d8ff2578b869d17a9db1ce1c621382b6", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "b79962d09cefd33001706255187bdb483a0c2b4442d5edc6822eb7574a8df0a8"}, "ex_machina": {:hex, :ex_machina, "2.7.0", "b792cc3127fd0680fecdb6299235b4727a4944a09ff0fa904cc639272cd92dc7", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "419aa7a39bde11894c87a615c4ecaa52d8f107bbdd81d810465186f783245bf8"}, "explorer": {:hex, :explorer, "0.5.7", "dd8d3dee6004ef18ca4cfaf9683f069b0dbc5fb84b758a3458b7dd8330ea88e5", [:mix], [{:nx, "~> 0.4.0 or ~> 0.5.0", [hex: :nx, repo: "hexpm", optional: true]}, {:rustler, "~> 0.28.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.5", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}, {:table, "~> 0.1.2", [hex: :table, repo: "hexpm", optional: false]}, {:table_rex, "~> 3.1.1", [hex: :table_rex, repo: "hexpm", optional: false]}], "hexpm", "b7e23182c72fc5d2c523ff55f54276719667c3257a00e25daea2f0e01bdea522"}, @@ -37,17 +37,17 @@ "finch": {:hex, :finch, "0.16.0", "40733f02c89f94a112518071c0a91fe86069560f5dbdb39f9150042f44dcfb1a", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.3", [hex: :mint, repo: "hexpm", optional: false]}, {:nimble_options, "~> 0.4 or ~> 1.0", [hex: :nimble_options, repo: "hexpm", optional: false]}, {:nimble_pool, "~> 0.2.6 or ~> 1.0", [hex: :nimble_pool, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f660174c4d519e5fec629016054d60edd822cdfe2b7270836739ac2f97735ec5"}, "floki": {:hex, :floki, "0.34.3", "5e2dcaec5d7c228ce5b1d3501502e308b2d79eb655e4191751a1fe491c37feac", [:mix], [], "hexpm", "9577440eea5b97924b4bf3c7ea55f7b8b6dce589f9b28b096cc294a8dc342341"}, "gen_stage": {:hex, :gen_stage, "1.2.1", "19d8b5e9a5996d813b8245338a28246307fd8b9c99d1237de199d21efc4c76a1", [:mix], [], "hexpm", "83e8be657fa05b992ffa6ac1e3af6d57aa50aace8f691fcf696ff02f8335b001"}, - "gettext": {:hex, :gettext, "0.22.3", "c8273e78db4a0bb6fba7e9f0fd881112f349a3117f7f7c598fa18c66c888e524", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "935f23447713954a6866f1bb28c3a878c4c011e802bcd68a726f5e558e4b64bd"}, + "gettext": {:hex, :gettext, "0.23.1", "821e619a240e6000db2fc16a574ef68b3bd7fe0167ccc264a81563cc93e67a31", [:mix], [{:expo, "~> 0.4.0", [hex: :expo, repo: "hexpm", optional: false]}], "hexpm", "19d744a36b809d810d610b57c27b934425859d158ebd56561bc41f7eeb8795db"}, "git_hooks": {:hex, :git_hooks, "0.4.2", "93604c8f6dff28500aaecc1988de319308fb7aa2c27bc89460b1f48aedd8bf7a", [:mix], [{:blankable, "~> 1.0.0", [hex: :blankable, repo: "hexpm", optional: false]}, {:recase, "~> 0.6.0", [hex: :recase, repo: "hexpm", optional: false]}], "hexpm", "0e46c04847b86d88857149840a614e018d57f79ca3f3b921a93e007cbea546d4"}, "gollum": {:hex, :new_gollum, "0.4.0", "89e3e2fc5abd032455341c4a03bcef7042b8d08e02c51df24b99a1a0a1ad69b1", [:mix], [{:httpoison, "~> 1.7", [hex: :httpoison, repo: "hexpm", optional: false]}], "hexpm", "85c68465e8678637638656945677062a4e7086e91a04d5c4bca1027321c74582"}, - "hackney": {:hex, :hackney, "1.18.1", "f48bf88f521f2a229fc7bae88cf4f85adc9cd9bcf23b5dc8eb6a1788c662c4f6", [:rebar3], [{:certifi, "~> 2.9.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.3.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "a4ecdaff44297e9b5894ae499e9a070ea1888c84afdd1fd9b7b2bc384950128e"}, + "hackney": {:hex, :hackney, "1.20.1", "8d97aec62ddddd757d128bfd1df6c5861093419f8f7a4223823537bad5d064e2", [:rebar3], [{:certifi, "~> 2.12.0", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "~> 6.1.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "~> 1.0.0", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "~> 1.1", [hex: :mimerl, repo: "hexpm", optional: false]}, {:parse_trans, "3.4.1", [hex: :parse_trans, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "~> 1.1.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}, {:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "fe9094e5f1a2a2c0a7d10918fee36bfec0ec2a979994cff8cfe8058cd9af38e3"}, "hpax": {:hex, :hpax, "0.1.2", "09a75600d9d8bbd064cdd741f21fc06fc1f4cf3d0fcc335e5aa19be1a7235c84", [:mix], [], "hexpm", "2c87843d5a23f5f16748ebe77969880e29809580efdaccd615cd3bed628a8c13"}, "html_entities": {:hex, :html_entities, "0.5.2", "9e47e70598da7de2a9ff6af8758399251db6dbb7eebe2b013f2bbd2515895c3c", [:mix], [], "hexpm", "c53ba390403485615623b9531e97696f076ed415e8d8058b1dbaa28181f4fdcc"}, "httpoison": {:hex, :httpoison, "1.8.2", "9eb9c63ae289296a544842ef816a85d881d4a31f518a0fec089aaa744beae290", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "2bb350d26972e30c96e2ca74a1aaf8293d61d0742ff17f01e0279fef11599921"}, "idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~> 0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"}, - "jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"}, + "jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"}, "lucide_icons": {:hex, :lucide_icons, "1.0.0", "b3609534b60a36c2018d462e40b3bfbcde4bf5f7d3b02f531319b3a3a72a139e", [:mix], [{:phoenix_html, "~> 3.2", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_live_view, "~> 0.17", [hex: :phoenix_live_view, repo: "hexpm", optional: true]}], "hexpm", "7feb3b7aaa53e85357d6afbd12d96a9d2d5fbe5cb224f63f663ac3a1ac6dca34"}, - "makeup": {:hex, :makeup, "1.1.0", "6b67c8bc2882a6b6a445859952a602afc1a41c2e08379ca057c0f525366fc3ca", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "0a45ed501f4a8897f580eabf99a2e5234ea3e75a4373c8a52824f6e873be57a6"}, + "makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"}, "makeup_eex": {:hex, :makeup_eex, "0.1.1", "89352d5da318d97ae27bbcc87201f274504d2b71ede58ca366af6a5fbed9508d", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.16", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_html, "~> 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d111a0994eaaab09ef1a4b3b313ef806513bb4652152c26c0d7ca2be8402a964"}, "makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"}, "makeup_erlang": {:hex, :makeup_erlang, "0.1.2", "ad87296a092a46e03b7e9b0be7631ddcf64c790fa68a9ef5323b6cbb36affc72", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "f3f5a1ca93ce6e092d92b6d9c049bcda58a3b617a8d888f8e7231c85630e8108"}, @@ -56,27 +56,27 @@ "mime": {:hex, :mime, "2.0.5", "dc34c8efd439abe6ae0343edbb8556f4d63f178594894720607772a041b04b02", [:mix], [], "hexpm", "da0d64a365c45bc9935cc5c8a7fc5e49a0e0f9932a761c55d6c52b142780a05c"}, "mimerl": {:hex, :mimerl, "1.2.0", "67e2d3f571088d5cfd3e550c383094b47159f3eee8ffa08e64106cdf5e981be3", [:rebar3], [], "hexpm", "f278585650aa581986264638ebf698f8bb19df297f66ad91b18910dfc6e19323"}, "mint": {:hex, :mint, "1.5.1", "8db5239e56738552d85af398798c80648db0e90f343c8469f6c6d8898944fb6f", [:mix], [{:castore, "~> 0.1.0 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:hpax, "~> 0.1.1", [hex: :hpax, repo: "hexpm", optional: false]}], "hexpm", "4a63e1e76a7c3956abd2c72f370a0d0aecddc3976dea5c27eccbecfa5e7d5b1e"}, - "mox": {:hex, :mox, "1.0.2", "dc2057289ac478b35760ba74165b4b3f402f68803dd5aecd3bfd19c183815d64", [:mix], [], "hexpm", "f9864921b3aaf763c8741b5b8e6f908f44566f1e427b2630e89e9a73b981fef2"}, + "mox": {:hex, :mox, "1.1.0", "0f5e399649ce9ab7602f72e718305c0f9cdc351190f72844599545e4996af73c", [:mix], [], "hexpm", "d44474c50be02d5b72131070281a5d3895c0e7a95c780e90bc0cfe712f633a13"}, "nanoid": {:hex, :nanoid, "2.0.5", "1d2948d8967ef2d948a58c3fef02385040bd9823fc6394bd604b8d98e5516b22", [:mix], [], "hexpm", "956e8876321104da72aa48770539ff26b36b744cd26753ec8e7a8a37e53d5f58"}, "nimble_csv": {:hex, :nimble_csv, "1.2.0", "4e26385d260c61eba9d4412c71cea34421f296d5353f914afe3f2e71cce97722", [:mix], [], "hexpm", "d0628117fcc2148178b034044c55359b26966c6eaa8e2ce15777be3bbc91b12a"}, "nimble_options": {:hex, :nimble_options, "1.0.2", "92098a74df0072ff37d0c12ace58574d26880e522c22801437151a159392270e", [:mix], [], "hexpm", "fd12a8db2021036ce12a309f26f564ec367373265b53e25403f0ee697380f1b8"}, - "nimble_parsec": {:hex, :nimble_parsec, "1.3.1", "2c54013ecf170e249e9291ed0a62e5832f70a476c61da16f6aac6dca0189f2af", [:mix], [], "hexpm", "2682e3c0b2eb58d90c6375fc0cc30bc7be06f365bf72608804fb9cffa5e1b167"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, "nimble_pool": {:hex, :nimble_pool, "1.0.0", "5eb82705d138f4dd4423f69ceb19ac667b3b492ae570c9f5c900bb3d2f50a847", [:mix], [], "hexpm", "80be3b882d2d351882256087078e1b1952a28bf98d0a287be87e4a24a710b67a"}, - "parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"}, - "phoenix": {:hex, :phoenix, "1.7.6", "61f0625af7c1d1923d582470446de29b008c0e07ae33d7a3859ede247ddaf59a", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "f6b4be7780402bb060cbc6e83f1b6d3f5673b674ba73cc4a7dd47db0322dfb88"}, - "phoenix_ecto": {:hex, :phoenix_ecto, "4.4.2", "b21bd01fdeffcfe2fab49e4942aa938b6d3e89e93a480d4aee58085560a0bc0d", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "70242edd4601d50b69273b057ecf7b684644c19ee750989fd555625ae4ce8f5d"}, - "phoenix_html": {:hex, :phoenix_html, "3.3.1", "4788757e804a30baac6b3fc9695bf5562465dd3f1da8eb8460ad5b404d9a2178", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "bed1906edd4906a15fd7b412b85b05e521e1f67c9a85418c55999277e553d0d3"}, + "parse_trans": {:hex, :parse_trans, "3.4.1", "6e6aa8167cb44cc8f39441d05193be6e6f4e7c2946cb2759f015f8c56b76e5ff", [:rebar3], [], "hexpm", "620a406ce75dada827b82e453c19cf06776be266f5a67cff34e1ef2cbb60e49a"}, + "phoenix": {:hex, :phoenix, "1.7.10", "02189140a61b2ce85bb633a9b6fd02dff705a5f1596869547aeb2b2b95edd729", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.1", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}, {:websock_adapter, "~> 0.5.3", [hex: :websock_adapter, repo: "hexpm", optional: false]}], "hexpm", "cf784932e010fd736d656d7fead6a584a4498efefe5b8227e9f383bf15bb79d0"}, + "phoenix_ecto": {:hex, :phoenix_ecto, "4.4.3", "86e9878f833829c3f66da03d75254c155d91d72a201eb56ae83482328dc7ca93", [:mix], [{:ecto, "~> 3.5", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "d36c401206f3011fefd63d04e8ef626ec8791975d9d107f9a0817d426f61ac07"}, + "phoenix_html": {:hex, :phoenix_html, "3.3.3", "380b8fb45912b5638d2f1d925a3771b4516b9a78587249cabe394e0a5d579dc9", [:mix], [{:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "923ebe6fec6e2e3b3e569dfbdc6560de932cd54b000ada0208b5f45024bdd76c"}, "phoenix_live_reload": {:hex, :phoenix_live_reload, "1.4.1", "2aff698f5e47369decde4357ba91fc9c37c6487a512b41732818f2204a8ef1d3", [:mix], [{:file_system, "~> 0.2.1 or ~> 0.3", [hex: :file_system, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.4", [hex: :phoenix, repo: "hexpm", optional: false]}], "hexpm", "9bffb834e7ddf08467fe54ae58b5785507aaba6255568ae22b4d46e2bb3615ab"}, - "phoenix_live_view": {:hex, :phoenix_live_view, "0.19.3", "3918c1b34df8ac71a9a636806ba5b7f053349a0392b312e16f35b0bf4d070aab", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "545626887948495fd8ea23d83b75bd7aaf9dc4221563e158d2c4b52ea1dd7e00"}, + "phoenix_live_view": {:hex, :phoenix_live_view, "0.20.1", "92a37acf07afca67ac98bd326532ba8f44ad7d4bdf3e4361b03f7f02594e5ae9", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix, "~> 1.6.15 or ~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 3.3", [hex: :phoenix_html, repo: "hexpm", optional: false]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: true]}, {:plug, "~> 1.15", [hex: :plug, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.2 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "be494fd1215052729298b0e97d5c2ce8e719c00854b82cd8cf15c1cd7fcf6294"}, "phoenix_pubsub": {:hex, :phoenix_pubsub, "2.1.3", "3168d78ba41835aecad272d5e8cd51aa87a7ac9eb836eabc42f6e57538e3731d", [:mix], [], "hexpm", "bba06bc1dcfd8cb086759f0edc94a8ba2bc8896d5331a1e2c2902bf8e36ee502"}, - "phoenix_storybook": {:hex, :phoenix_storybook, "0.5.4", "41363f5b25766f16c1860afa19f2bc358ba102103e9ba8b1272804b3983303c7", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:heroicons, "~> 0.5", [hex: :heroicons, repo: "hexpm", optional: true]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: true]}, {:makeup_eex, "~> 0.1.0", [hex: :makeup_eex, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_live_view, "> 0.18.7", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}], "hexpm", "333b165ccd3621c09ffb281fb335845be009166702af15cce27c3e32162ca837"}, - "phoenix_template": {:hex, :phoenix_template, "1.0.1", "85f79e3ad1b0180abb43f9725973e3b8c2c3354a87245f91431eec60553ed3ef", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "157dc078f6226334c91cb32c1865bf3911686f8bcd6bcff86736f6253e6993ee"}, - "phoenix_view": {:hex, :phoenix_view, "2.0.2", "6bd4d2fd595ef80d33b439ede6a19326b78f0f1d8d62b9a318e3d9c1af351098", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "a929e7230ea5c7ee0e149ffcf44ce7cf7f4b6d2bfe1752dd7c084cdff152d36f"}, - "plug": {:hex, :plug, "1.14.2", "cff7d4ec45b4ae176a227acd94a7ab536d9b37b942c8e8fa6dfc0fff98ff4d80", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "842fc50187e13cf4ac3b253d47d9474ed6c296a8732752835ce4a86acdf68d13"}, + "phoenix_storybook": {:hex, :phoenix_storybook, "0.5.7", "7424365f25ce864971acc16e0a8669e286e41454c02707f7d567205411638f88", [:mix], [{:earmark, "~> 1.4", [hex: :earmark, repo: "hexpm", optional: false]}, {:heroicons, "~> 0.5", [hex: :heroicons, repo: "hexpm", optional: true]}, {:jason, "~> 1.3", [hex: :jason, repo: "hexpm", optional: true]}, {:makeup_eex, "~> 0.1.0", [hex: :makeup_eex, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.7.0", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_live_view, "> 0.18.7", [hex: :phoenix_live_view, repo: "hexpm", optional: false]}, {:phoenix_view, "~> 2.0", [hex: :phoenix_view, repo: "hexpm", optional: false]}], "hexpm", "c9a885987346fd1d57d1058021c2b830c117fc8bd871e6d8e86cfb5d074337ce"}, + "phoenix_template": {:hex, :phoenix_template, "1.0.3", "32de561eefcefa951aead30a1f94f1b5f0379bc9e340bb5c667f65f1edfa4326", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}], "hexpm", "16f4b6588a4152f3cc057b9d0c0ba7e82ee23afa65543da535313ad8d25d8e2c"}, + "phoenix_view": {:hex, :phoenix_view, "2.0.3", "4d32c4817fce933693741deeb99ef1392619f942633dde834a5163124813aad3", [:mix], [{:phoenix_html, "~> 2.14.2 or ~> 3.0 or ~> 4.0", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_template, "~> 1.0", [hex: :phoenix_template, repo: "hexpm", optional: false]}], "hexpm", "cd34049af41be2c627df99cd4eaa71fc52a328c0c3d8e7d4aa28f880c30e7f64"}, + "plug": {:hex, :plug, "1.15.1", "b7efd81c1a1286f13efb3f769de343236bd8b7d23b4a9f40d3002fc39ad8f74c", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "459497bd94d041d98d948054ec6c0b76feacd28eec38b219ca04c0de13c79d30"}, "plug_cowboy": {:hex, :plug_cowboy, "2.6.1", "9a3bbfceeb65eff5f39dab529e5cd79137ac36e913c02067dba3963a26efe9b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "de36e1a21f451a18b790f37765db198075c25875c64834bcc82d90b309eb6613"}, - "plug_crypto": {:hex, :plug_crypto, "1.2.5", "918772575e48e81e455818229bf719d4ab4181fcbf7f85b68a35620f78d89ced", [:mix], [], "hexpm", "26549a1d6345e2172eb1c233866756ae44a9609bd33ee6f99147ab3fd87fd842"}, + "plug_crypto": {:hex, :plug_crypto, "2.0.0", "77515cc10af06645abbfb5e6ad7a3e9714f805ae118fa1a70205f80d2d70fe73", [:mix], [], "hexpm", "53695bae57cc4e54566d993eb01074e4d894b65a3766f1c43e2c61a1b0f45ea9"}, "poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm", "fec8660eb7733ee4117b85f55799fd3833eb769a6df71ccf8903e8dc5447cfce"}, - "postgrex": {:hex, :postgrex, "0.17.1", "01c29fd1205940ee55f7addb8f1dc25618ca63a8817e56fac4f6846fc2cddcbe", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "14b057b488e73be2beee508fb1955d8db90d6485c6466428fe9ccf1d6692a555"}, + "postgrex": {:hex, :postgrex, "0.17.3", "c92cda8de2033a7585dae8c61b1d420a1a1322421df84da9a82a6764580c503d", [:mix], [{:db_connection, "~> 2.1", [hex: :db_connection, repo: "hexpm", optional: false]}, {:decimal, "~> 1.5 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:table, "~> 0.1.0", [hex: :table, repo: "hexpm", optional: true]}], "hexpm", "946cf46935a4fdca7a81448be76ba3503cff082df42c6ec1ff16a4bdfbfb098d"}, "ranch": {:hex, :ranch, "1.8.0", "8c7a100a139fd57f17327b6413e4167ac559fbc04ca7448e9be9057311597a1d", [:make, :rebar3], [], "hexpm", "49fbcfd3682fab1f5d109351b61257676da1a2fdbe295904176d5e521a2ddfe5"}, "recase": {:hex, :recase, "0.6.0", "1dd2dd2f4e06603b74977630e739f08b7fedbb9420cc14de353666c2fc8b99f4", [:mix], [], "hexpm", "8712e318420a228eb2e6366ada230148ed3a4316a798319edd5512f64d78c990"}, "req": {:hex, :req, "0.3.10", "71b6457cba0929deedb4ceb5747d46f6c0b4d6be1f94a91b2c6a90f3e4a892bd", [:mix], [{:brotli, "~> 0.3.1", [hex: :brotli, repo: "hexpm", optional: true]}, {:ezstd, "~> 1.0", [hex: :ezstd, repo: "hexpm", optional: true]}, {:finch, "~> 0.9", [hex: :finch, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:mime, "~> 1.6 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:nimble_csv, "~> 1.0", [hex: :nimble_csv, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: true]}], "hexpm", "43489aa0d5b899215088cd6fea4125569009304c24b15215e3d02883aa0e79d8"}, @@ -84,18 +84,18 @@ "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "table": {:hex, :table, "0.1.2", "87ad1125f5b70c5dea0307aa633194083eb5182ec537efc94e96af08937e14a8", [:mix], [], "hexpm", "7e99bc7efef806315c7e65640724bf165c3061cdc5d854060f74468367065029"}, "table_rex": {:hex, :table_rex, "3.1.1", "0c67164d1714b5e806d5067c1e96ff098ba7ae79413cc075973e17c38a587caa", [:mix], [], "hexpm", "678a23aba4d670419c23c17790f9dcd635a4a89022040df7d5d772cb21012490"}, - "tailwind": {:hex, :tailwind, "0.2.1", "83d8eadbe71a8e8f67861fe7f8d51658ecfb258387123afe4d9dc194eddc36b0", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "e8a13f6107c95f73e58ed1b4221744e1eb5a093cd1da244432067e19c8c9a277"}, + "tailwind": {:hex, :tailwind, "0.2.2", "9e27288b568ede1d88517e8c61259bc214a12d7eed271e102db4c93fcca9b2cd", [:mix], [{:castore, ">= 0.0.0", [hex: :castore, repo: "hexpm", optional: false]}], "hexpm", "ccfb5025179ea307f7f899d1bb3905cd0ac9f687ed77feebc8f67bdca78565c4"}, "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, "telemetry_metrics": {:hex, :telemetry_metrics, "0.6.1", "315d9163a1d4660aedc3fee73f33f1d355dcc76c5c3ab3d59e76e3edf80eef1f", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7be9e0871c41732c233be71e4be11b96e56177bf15dde64a8ac9ce72ac9834c6"}, "telemetry_poller": {:hex, :telemetry_poller, "0.5.1", "21071cc2e536810bac5628b935521ff3e28f0303e770951158c73eaaa01e962a", [:rebar3], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "4cab72069210bc6e7a080cec9afffad1b33370149ed5d379b81c7c5f0c663fd4"}, - "tesla": {:hex, :tesla, "1.7.0", "a62dda2f80d4f8a925eb7b8c5b78c461e0eb996672719fe1a63b26321a5f8b4e", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, "~> 1.3", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "2e64f01ebfdb026209b47bc651a0e65203fcff4ae79c11efb73c4852b00dc313"}, + "tesla": {:hex, :tesla, "1.8.0", "d511a4f5c5e42538d97eef7c40ec4f3e44effdc5068206f42ed859e09e51d1fd", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: true]}, {:finch, "~> 0.13", [hex: :finch, repo: "hexpm", optional: true]}, {:fuse, "~> 2.4", [hex: :fuse, repo: "hexpm", optional: true]}, {:gun, ">= 1.0.0", [hex: :gun, repo: "hexpm", optional: true]}, {:hackney, "~> 1.6", [hex: :hackney, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.2", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:jason, ">= 1.0.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:msgpax, "~> 2.3", [hex: :msgpax, repo: "hexpm", optional: true]}, {:poison, ">= 1.0.0", [hex: :poison, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "10501f360cd926a309501287470372af1a6e1cbed0f43949203a4c13300bc79f"}, "thousand_island": {:hex, :thousand_island, "0.6.7", "3a91a7e362ca407036c6691e8a4f6e01ac8e901db3598875863a149279ac8571", [:mix], [{:telemetry, "~> 0.4 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "541a5cb26b88adf8d8180b6b96a90f09566b4aad7a6b3608dcac969648cf6765"}, "timex": {:hex, :timex, "3.7.11", "bb95cb4eb1d06e27346325de506bcc6c30f9c6dea40d1ebe390b262fad1862d1", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:gettext, "~> 0.20", [hex: :gettext, repo: "hexpm", optional: false]}, {:tzdata, "~> 1.1", [hex: :tzdata, repo: "hexpm", optional: false]}], "hexpm", "8b9024f7efbabaf9bd7aa04f65cf8dcd7c9818ca5737677c7b76acbc6a94d1aa"}, "tzdata": {:hex, :tzdata, "1.1.1", "20c8043476dfda8504952d00adac41c6eda23912278add38edc140ae0c5bcc46", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "a69cec8352eafcd2e198dea28a34113b60fdc6cb57eb5ad65c10292a6ba89787"}, "unicode_util_compat": {:hex, :unicode_util_compat, "0.7.0", "bc84380c9ab48177092f43ac89e4dfa2c6d62b40b8bd132b1059ecc7232f9a78", [:rebar3], [], "hexpm", "25eee6d67df61960cf6a794239566599b09e17e668d3700247bc498638152521"}, - "unzip": {:hex, :unzip, "0.8.0", "ee21d87c21b01567317387dab4228ac570ca15b41cfc221a067354cbf8e68c4d", [:mix], [], "hexpm", "ffa67a483efcedcb5876971a50947222e104d5f8fea2c4a0441e6f7967854827"}, - "websock": {:hex, :websock, "0.5.2", "b3c08511d8d79ed2c2f589ff430bd1fe799bb389686dafce86d28801783d8351", [:mix], [], "hexpm", "925f5de22fca6813dfa980fb62fd542ec43a2d1a1f83d2caec907483fe66ff05"}, - "websock_adapter": {:hex, :websock_adapter, "0.5.3", "4908718e42e4a548fc20e00e70848620a92f11f7a6add8cf0886c4232267498d", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "cbe5b814c1f86b6ea002b52dd99f345aeecf1a1a6964e209d208fb404d930d3d"}, + "unzip": {:hex, :unzip, "0.9.0", "8a4be70b49e28c58811c9ef11e78df991f4ba39c770c63ad2d88a69c29e4d8e2", [:mix], [], "hexpm", "084a774070d87ae415afe2b4dbd3ec275b31933ad909c235fd772055c2decea1"}, + "websock": {:hex, :websock, "0.5.3", "2f69a6ebe810328555b6fe5c831a851f485e303a7c8ce6c5f675abeb20ebdadc", [:mix], [], "hexpm", "6105453d7fac22c712ad66fab1d45abdf049868f253cf719b625151460b8b453"}, + "websock_adapter": {:hex, :websock_adapter, "0.5.5", "9dfeee8269b27e958a65b3e235b7e447769f66b5b5925385f5a569269164a210", [:mix], [{:bandit, ">= 0.6.0", [hex: :bandit, repo: "hexpm", optional: true]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 2.6", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:websock, "~> 0.5", [hex: :websock, repo: "hexpm", optional: false]}], "hexpm", "4b977ba4a01918acbf77045ff88de7f6972c2a009213c515a445c48f224ffce9"}, "yamerl": {:hex, :yamerl, "0.10.0", "4ff81fee2f1f6a46f1700c0d880b24d193ddb74bd14ef42cb0bcf46e81ef2f8e", [:rebar3], [], "hexpm", "346adb2963f1051dc837a2364e4acf6eb7d80097c0f53cbdc3046ec8ec4b4e6e"}, "yaml_elixir": {:hex, :yaml_elixir, "2.9.0", "9a256da867b37b8d2c1ffd5d9de373a4fda77a32a45b452f1708508ba7bbcb53", [:mix], [{:yamerl, "~> 0.10", [hex: :yamerl, repo: "hexpm", optional: false]}], "hexpm", "0cb0e7d4c56f5e99a6253ed1a670ed0e39c13fc45a6da054033928607ac08dfc"}, } From b423733b4f61aeb59aa8d01037b93335009e21d7 Mon Sep 17 00:00:00 2001 From: Douglas Tofoli Date: Fri, 10 Nov 2023 14:59:40 -0300 Subject: [PATCH 2/4] Feat/relatorios (#133) * feat: create migration and schema for new table relatorios * feat: create new liveview for relatorios * fix: remove old alias and add new alis for relatorio_pesquisa model * chore: mix format * chore: fix credo * fix: fix tests * fix: fix tests * fix: report is not saving * feat: blocks editing when the report has been delivered --------- Co-authored-by: Zoey de Souza Pessanha --- .../adapters/relatorio_adapter.ex | 15 +- .../handlers/relatorios_handler.ex | 6 + .../modulo_pesquisa/i_manage_repository.ex | 13 +- .../lib/modulo_pesquisa/models/pesquisador.ex | 18 +- .../models/relatorio_anual_pesquisa.ex | 78 --------- .../models/relatorio_mensal_pesquisa.ex | 81 --------- .../models/relatorio_pesquisa.ex | 82 ++++++++++ .../models/relatorio_trimestral_pesquisa.ex | 75 --------- .../lib/modulo_pesquisa/repository.ex | 57 +++---- .../modulo_pesquisa/schemas/conteudo_anual.ex | 32 ++++ .../schemas/conteudo_mensal.ex | 32 ++++ .../schemas/conteudo_trimestral.ex | 30 ++++ ...20230915181156_cria_relatorio_pesquisa.exs | 21 +++ .../models/relatorio_anual_test.exs | 32 ---- .../models/relatorio_mensal_test.exs | 56 ------- .../models/relatorio_pesquisa_test.exs | 33 ++++ .../models/relatorio_trimestral_test.exs | 34 ---- .../test/modulo_pesquisa/repository_test.exs | 80 +++++---- apps/modulo_pesquisa/test/support/factory.ex | 67 +------- apps/plataforma_digital/assets/css/app.scss | 2 +- .../app/researcher/relatorio/mensal.scss | 24 --- .../app/researcher/relatorio/report.scss | 38 +++++ .../lib/plataforma_digital/design_system.ex | 135 +++++++-------- .../live/pesquisa/relatorio/form_component.ex | 154 ++++++++++++++++++ .../live/pesquisa/relatorio/index.ex | 109 +++++++++++++ .../live/pesquisa/relatorio/index.html.heex | 13 ++ .../live/pesquisa/relatorio/mensal_live.ex | 64 -------- .../pesquisa/relatorio/mensal_live.html.heex | 7 - .../lib/plataforma_digital/router.ex | 3 +- 29 files changed, 718 insertions(+), 673 deletions(-) delete mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_anual_pesquisa.ex delete mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_mensal_pesquisa.ex create mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_pesquisa.ex delete mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_trimestral_pesquisa.ex create mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_anual.ex create mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_mensal.ex create mode 100644 apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_trimestral.ex create mode 100644 apps/modulo_pesquisa/priv/repo/migrations/20230915181156_cria_relatorio_pesquisa.exs delete mode 100644 apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_anual_test.exs delete mode 100644 apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_mensal_test.exs create mode 100644 apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_pesquisa_test.exs delete mode 100644 apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_trimestral_test.exs delete mode 100644 apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/mensal.scss create mode 100644 apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/report.scss create mode 100644 apps/plataforma_digital/lib/plataforma_digital/live/pesquisa/relatorio/form_component.ex create mode 100644 apps/plataforma_digital/lib/plataforma_digital/live/pesquisa/relatorio/index.ex create mode 100644 apps/plataforma_digital/lib/plataforma_digital/live/pesquisa/relatorio/index.html.heex delete mode 100644 apps/plataforma_digital/lib/plataforma_digital/live/pesquisa/relatorio/mensal_live.ex delete mode 100644 apps/plataforma_digital/lib/plataforma_digital/live/pesquisa/relatorio/mensal_live.html.heex diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/adapters/relatorio_adapter.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/adapters/relatorio_adapter.ex index 18bbf317..e891d434 100644 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/adapters/relatorio_adapter.ex +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/adapters/relatorio_adapter.ex @@ -2,18 +2,15 @@ defmodule ModuloPesquisa.Adapters.RelatorioAdapter do import Timex.Format.DateTime.Formatter, only: [lformat!: 3] alias Identidades.Handlers.UsuarioHandler - - alias ModuloPesquisa.Models.RelatorioAnualPesquisa, as: Anual - alias ModuloPesquisa.Models.RelatorioMensalPesquisa, as: Mensal - alias ModuloPesquisa.Models.RelatorioTrimestralPesquisa, as: Trimestral + alias ModuloPesquisa.Models.RelatorioPesquisa, as: RelatorioPesquisaModel alias ModuloPesquisa.Schemas.RelatorioPesquisa @locale Application.compile_env(:pescarte, :locale, "pt_BR") - @type relatorio :: Anual.t() | Mensal.t() | Trimestral.t() @typep changeset :: Ecto.Changeset.t() - @spec internal_to_external(relatorio) :: {:ok, RelatorioPesquisa.t()} | {:error, changeset} + @spec internal_to_external(RelatorioPesquisaModel.t()) :: + {:ok, RelatorioPesquisa.t()} | {:error, changeset} def internal_to_external(%{pesquisador: pesquisador} = relatorio) do attrs = %{ status: relatorio.status, @@ -26,9 +23,9 @@ defmodule ModuloPesquisa.Adapters.RelatorioAdapter do RelatorioPesquisa.parse!(attrs) end - defp get_relatorio_tipo(%Anual{}), do: :anual - defp get_relatorio_tipo(%Mensal{}), do: :mensal - defp get_relatorio_tipo(%Trimestral{}), do: :trimestral + defp get_relatorio_tipo(%RelatorioPesquisa{tipo: "anual"}), do: :anual + defp get_relatorio_tipo(%RelatorioPesquisa{tipo: "mensal"}), do: :mensal + defp get_relatorio_tipo(%RelatorioPesquisa{tipo: "trimestral"}), do: :trimestral defp get_relatorio_periodo!(relatorio) do relatorio.ano diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/handlers/relatorios_handler.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/handlers/relatorios_handler.ex index 5abb0bc5..60adc83e 100644 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/handlers/relatorios_handler.ex +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/handlers/relatorios_handler.ex @@ -1,10 +1,16 @@ defmodule ModuloPesquisa.Handlers.RelatoriosHandler do alias ModuloPesquisa.Adapters.RelatorioAdapter alias ModuloPesquisa.Handlers.IManageRelatoriosHandler + alias ModuloPesquisa.Models.RelatorioPesquisa alias ModuloPesquisa.Repository @behaviour IManageRelatoriosHandler + @impl true + def change_relatorio_pesquisa(%RelatorioPesquisa{} = relatorio, attrs \\ %{}) do + RelatorioPesquisa.changeset(relatorio, attrs) + end + @impl true def list_relatorios_from_pesquisador(id, sorter \\ &sort_by_periodo/1) do id diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/i_manage_repository.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/i_manage_repository.ex index 59c59321..5af98a05 100644 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/i_manage_repository.ex +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/i_manage_repository.ex @@ -6,9 +6,7 @@ defmodule ModuloPesquisa.IManageRepository do alias ModuloPesquisa.Models.Midia.Tag alias ModuloPesquisa.Models.NucleoPesquisa alias ModuloPesquisa.Models.Pesquisador - alias ModuloPesquisa.Models.RelatorioAnualPesquisa - alias ModuloPesquisa.Models.RelatorioMensalPesquisa - alias ModuloPesquisa.Models.RelatorioTrimestralPesquisa + alias ModuloPesquisa.Models.RelatorioPesquisa @opaque changeset :: Ecto.Changeset.t() @@ -29,6 +27,7 @@ defmodule ModuloPesquisa.IManageRepository do @callback list_pesquisador :: list(Pesquisador.t()) @callback list_relatorios_pesquisa :: list(struct) @callback list_relatorios_pesquisa_from_pesquisador(Database.id()) :: list(struct) + @callback fetch_relatorio_pesquisa_by_id(Database.id()) :: struct @callback list_tag :: list(Tag.t()) @callback list_tags_from_categoria(Database.id()) :: list(Tag.t()) @callback list_tags_from_midia(Database.id()) :: list(Tag.t()) @@ -42,11 +41,7 @@ defmodule ModuloPesquisa.IManageRepository do {:ok, NucleoPesquisa.t()} | {:error, changeset} @callback upsert_pesquisador(Pesquisador.t(), map) :: {:ok, Pesquisador.t()} | {:error, changeset} - @callback upsert_relatorio_anual(RelatorioAnualPesquisa.t(), map) :: - {:ok, RelatorioAnualPesquisa.t()} | {:error, changeset} - @callback upsert_relatorio_mensal(RelatorioMensalPesquisa.t(), map) :: - {:ok, RelatorioMensalPesquisa.t()} | {:error, changeset} - @callback upsert_relatorio_trimestral(RelatorioTrimestralPesquisa.t(), map) :: - {:ok, RelatorioTrimestralPesquisa.t()} | {:error, changeset} + @callback upsert_relatorio_pesquisa(RelatorioPesquisa.t(), map) :: + {:ok, RelatorioPesquisa.t()} | {:error, changeset} @callback upsert_tag(Tag.t(), map) :: {:ok, Tag.t()} | {:error, changeset} end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/pesquisador.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/pesquisador.ex index 26d49bcf..c37660f4 100644 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/pesquisador.ex +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/pesquisador.ex @@ -5,9 +5,7 @@ defmodule ModuloPesquisa.Models.Pesquisador do alias ModuloPesquisa.Models.Campus alias ModuloPesquisa.Models.LinhaPesquisa alias ModuloPesquisa.Models.Midia - alias ModuloPesquisa.Models.RelatorioAnualPesquisa - alias ModuloPesquisa.Models.RelatorioMensalPesquisa - alias ModuloPesquisa.Models.RelatorioTrimestralPesquisa + alias ModuloPesquisa.Models.RelatorioPesquisa @type t :: %Pesquisador{ minibio: binary, @@ -26,9 +24,7 @@ defmodule ModuloPesquisa.Models.Pesquisador do orientandos: list(Pesquisador.t()), orientador: Pesquisador.t() | nil, midias: list(Midia.t()), - relatorios_anuais: list(RelatorioAnualPesquisa.t()), - relatorios_mensais: list(RelatorioMensalPesquisa.t()), - relatorios_trimestrais: list(RelatorioTrimestralPesquisa.t()), + relatorios_pesquisa: list(RelatorioPesquisa.t()), campus: Campus.t(), usuario: User.t() } @@ -63,7 +59,7 @@ defmodule ModuloPesquisa.Models.Pesquisador do foreign_key: :responsavel_lp_id, references: :id_publico - has_many :relatorios_anuais, RelatorioAnualPesquisa, + has_many :relatorios_pesquisa, RelatorioPesquisa, references: :id_publico, foreign_key: :pesquisador_id @@ -74,14 +70,6 @@ defmodule ModuloPesquisa.Models.Pesquisador do references: :id_publico, foreign_key: :pesquisador_id - has_many :relatorios_mensais, RelatorioMensalPesquisa, - references: :id_publico, - foreign_key: :pesquisador_id - - has_many :relatorios_trimestrais, RelatorioTrimestralPesquisa, - references: :id_publico, - foreign_key: :pesquisador_id - belongs_to :usuario, Usuario, on_replace: :update, references: :id_publico, diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_anual_pesquisa.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_anual_pesquisa.ex deleted file mode 100644 index 46b6bcc0..00000000 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_anual_pesquisa.ex +++ /dev/null @@ -1,78 +0,0 @@ -defmodule ModuloPesquisa.Models.RelatorioAnualPesquisa do - use Database, :model - - alias ModuloPesquisa.Models.Pesquisador - - @type t :: %RelatorioAnualPesquisa{ - plano_de_trabalho: binary, - resumo: binary, - introducao: binary, - embasamento_teorico: binary, - resultados: binary, - atividades_academicas: binary, - atividades_nao_academicas: binary, - conclusao: binary, - referencias: binary, - status: atom, - link: binary, - ano: integer, - mes: integer, - pesquisador: Pesquisador.t(), - id_publico: binary, - data_entrega: Date.t() - } - - @status ~w(entregue atrasado pendente)a - - @required_fields ~w(ano mes pesquisador_id)a - - @optional_fields ~w( - data_entrega - plano_de_trabalho - resumo - introducao - embasamento_teorico - resultados - atividades_academicas - atividades_nao_academicas - conclusao - referencias - status - link - )a - - @primary_key false - schema "relatorio_anual_pesquisa" do - field :ano, :integer, primary_key: true - field :mes, :integer, primary_key: true - field :link, :string - field :id_publico, Database.Types.PublicId, autogenerate: true - field :status, Ecto.Enum, values: @status, default: :pendente - field :data_entrega, :date - - field :plano_de_trabalho, :string - field :resumo, :string - field :introducao, :string - field :embasamento_teorico, :string - field :resultados, :string - field :atividades_academicas, :string - field :atividades_nao_academicas, :string - field :conclusao, :string - field :referencias, :string - - belongs_to :pesquisador, Pesquisador, - on_replace: :update, - references: :id_publico, - type: :string - - timestamps() - end - - @spec changeset(RelatorioAnualPesquisa.t(), map) :: changeset - def changeset(%RelatorioAnualPesquisa{} = relatorio_anual, attrs) do - relatorio_anual - |> cast(attrs, @required_fields ++ @optional_fields) - |> validate_required(@required_fields) - |> foreign_key_constraint(:pesquisador_id) - end -end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_mensal_pesquisa.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_mensal_pesquisa.ex deleted file mode 100644 index 46b72ac0..00000000 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_mensal_pesquisa.ex +++ /dev/null @@ -1,81 +0,0 @@ -defmodule ModuloPesquisa.Models.RelatorioMensalPesquisa do - use Database, :model - - alias ModuloPesquisa.Models.Pesquisador - - @type t :: %RelatorioMensalPesquisa{ - acao_planejamento: binary, - participacao_grupos_estudo: binary, - acoes_pesquisa: binary, - participacao_treinamentos: binary, - publicacao: binary, - previsao_acao_planejamento: binary, - previsao_participacao_grupos_estudo: binary, - previsao_participacao_treinamentos: binary, - previsao_acoes_pesquisa: binary, - status: atom, - link: binary, - ano: integer, - mes: integer, - pesquisador: Pesquisador.t(), - id_publico: binary, - data_entrega: Date.t() - } - - @status ~w(entregue atrasado pendente)a - - @required_fields ~w(ano mes pesquisador_id)a - - @optional_fields ~w( - data_entrega - acao_planejamento - participacao_grupos_estudo - acoes_pesquisa - participacao_treinamentos - publicacao - previsao_acao_planejamento - previsao_participacao_grupos_estudo - previsao_participacao_treinamentos - previsao_acoes_pesquisa - status - link - )a - - @primary_key false - schema "relatorio_mensal_pesquisa" do - # Primeira seção - field :acao_planejamento, :string - field :participacao_grupos_estudo, :string - field :acoes_pesquisa, :string - field :participacao_treinamentos, :string - field :publicacao, :string - - # Segunda seção - field :previsao_acao_planejamento, :string - field :previsao_participacao_grupos_estudo, :string - field :previsao_participacao_treinamentos, :string - field :previsao_acoes_pesquisa, :string - - field :data_entrega, :date - field :status, Ecto.Enum, values: @status, default: :pendente - field :ano, :integer, primary_key: true - field :mes, :integer, primary_key: true - field :link, :string - field :id_publico, Database.Types.PublicId, autogenerate: true - - belongs_to :pesquisador, Pesquisador, - on_replace: :update, - references: :id_publico, - type: :string - - timestamps() - end - - @spec changeset(RelatorioMensalPesquisa.t(), map) :: changeset - def changeset(%RelatorioMensalPesquisa{} = relatorio_mensal, attrs) do - relatorio_mensal - |> cast(attrs, @required_fields ++ @optional_fields) - |> validate_required(@required_fields) - |> foreign_key_constraint(:pesquisador_id) - end -end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_pesquisa.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_pesquisa.ex new file mode 100644 index 00000000..08df346f --- /dev/null +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_pesquisa.ex @@ -0,0 +1,82 @@ +defmodule ModuloPesquisa.Models.RelatorioPesquisa do + use Database, :model + + alias ModuloPesquisa.Models.Pesquisador + alias ModuloPesquisa.Schemas.ConteudoAnual + alias ModuloPesquisa.Schemas.ConteudoMensal + alias ModuloPesquisa.Schemas.ConteudoTrimestral + + @type t :: %RelatorioPesquisa{ + tipo: atom, + data_inicio: Date.t(), + data_fim: Date.t(), + data_entrega: Date.t(), + data_limite: Date.t(), + link: binary, + status: atom, + pesquisador: Pesquisador.t(), + id_publico: binary + } + + @tipo ~w(mensal bimestral trimestral anual)a + @status ~w(entregue atrasado pendente)a + + @required_fields ~w(tipo data_inicio data_fim status pesquisador_id)a + @optional_fields ~w(data_entrega data_limite link)a + + @primary_key false + schema "relatorio_pesquisa" do + field(:link, :string) + field(:data_inicio, :date, primary_key: true) + field(:data_fim, :date, primary_key: true) + field(:data_entrega, :date) + field(:data_limite, :date) + field(:tipo, Ecto.Enum, values: @tipo) + field(:status, Ecto.Enum, values: @status) + field(:id_publico, Database.Types.PublicId, autogenerate: true) + + embeds_one(:conteudo_anual, ConteudoAnual, source: :conteudo, on_replace: :update) + embeds_one(:conteudo_mensal, ConteudoMensal, source: :conteudo, on_replace: :update) + embeds_one(:conteudo_trimestral, ConteudoTrimestral, source: :conteudo, on_replace: :update) + + belongs_to(:pesquisador, Pesquisador, + on_replace: :update, + references: :id_publico, + type: :string, + primary_key: true + ) + + timestamps() + end + + @spec changeset(RelatorioPesquisa.t(), map) :: changeset + def changeset(%RelatorioPesquisa{} = relatorio, attrs) do + relatorio + |> cast(attrs, @required_fields ++ @optional_fields) + |> cast_embed(:conteudo_anual) + |> cast_embed(:conteudo_mensal) + |> cast_embed(:conteudo_trimestral) + |> validate_required(@required_fields) + |> validate_inclusion(:tipo, @tipo) + |> validate_inclusion(:status, @status) + |> foreign_key_constraint(:pesquisador_id) + |> validate_period() + end + + defp validate_period(changeset) do + start_date = get_field(changeset, :data_inicio) + end_date = get_field(changeset, :data_fim) + + case {start_date, end_date} do + {start_date, end_date} when is_nil(start_date) or is_nil(end_date) -> + changeset + + {_, _} -> + if Date.compare(start_date, end_date) == :gt do + add_error(changeset, :data_inicio, "A data de início deve ser anterior à data de fim") + else + changeset + end + end + end +end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_trimestral_pesquisa.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_trimestral_pesquisa.ex deleted file mode 100644 index ac00c3fa..00000000 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/models/relatorio_trimestral_pesquisa.ex +++ /dev/null @@ -1,75 +0,0 @@ -defmodule ModuloPesquisa.Models.RelatorioTrimestralPesquisa do - use Database, :model - - alias ModuloPesquisa.Models.Pesquisador - - @type t :: %RelatorioTrimestralPesquisa{ - titulo: binary, - resumo: binary, - introducao: binary, - embasamento_teorico: binary, - resultados_preliminares: binary, - atividades_academicas: binary, - atividades_nao_academicas: binary, - referencias: binary, - status: atom, - link: binary, - ano: integer, - mes: integer, - pesquisador: Pesquisador.t(), - id_publico: binary, - data_entrega: Date.t() - } - - @status ~w(entregue atrasado pendente)a - - @required_fields ~w(ano mes pesquisador_id)a - - @optional_fields ~w( - data_entrega - titulo - resumo - introducao - embasamento_teorico - resultados_preliminares - atividades_academicas - atividades_nao_academicas - referencias - status - link - )a - - @primary_key false - schema "relatorio_trimestral_pesquisa" do - field :ano, :integer, primary_key: true - field :mes, :integer, primary_key: true - field :link, :string - field :id_publico, Database.Types.PublicId, autogenerate: true - field :status, Ecto.Enum, values: @status, default: :pendente - field :data_entrega, :date - - field :titulo, :string - field :resumo, :string - field :introducao, :string - field :embasamento_teorico, :string - field :resultados_preliminares, :string - field :atividades_academicas, :string - field :atividades_nao_academicas, :string - field :referencias, :string - - belongs_to :pesquisador, Pesquisador, - on_replace: :update, - references: :id_publico, - type: :string - - timestamps() - end - - @spec changeset(RelatorioTrimestralPesquisa.t(), map) :: changeset - def changeset(%RelatorioTrimestralPesquisa{} = relatorio_trimestral, attrs) do - relatorio_trimestral - |> cast(attrs, @required_fields ++ @optional_fields) - |> validate_required(@required_fields) - |> foreign_key_constraint(:pesquisador_id) - end -end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/repository.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/repository.ex index d8414b8b..604f3200 100644 --- a/apps/modulo_pesquisa/lib/modulo_pesquisa/repository.ex +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/repository.ex @@ -11,8 +11,7 @@ defmodule ModuloPesquisa.Repository do alias ModuloPesquisa.Models.Midia.Tag alias ModuloPesquisa.Models.NucleoPesquisa alias ModuloPesquisa.Models.Pesquisador - alias ModuloPesquisa.Models.RelatorioAnualPesquisa - alias ModuloPesquisa.Models.RelatorioMensalPesquisa + alias ModuloPesquisa.Models.RelatorioPesquisa alias ModuloPesquisa.Models.RelatorioTrimestralPesquisa @behaviour IManageRepository @@ -70,7 +69,7 @@ defmodule ModuloPesquisa.Repository do @impl true def fetch_tags_from_ids(tags_ids) do - query = from t in Tag, where: t.id_publico in ^tags_ids, select: t + query = from(t in Tag, where: t.id_publico in ^tags_ids, select: t) Repo.replica().all(query) end @@ -88,7 +87,7 @@ defmodule ModuloPesquisa.Repository do @impl true def list_midias_from_tag(tag_etiqueta) do with {:ok, tag} <- Database.fetch(Tag, tag_etiqueta) do - query = from t in Tag, where: t.id == ^tag.id, preload: :midias + query = from(t in Tag, where: t.id == ^tag.id, preload: :midias) case Database.fetch_one(query) do {:error, :not_found} -> [] @@ -99,40 +98,40 @@ defmodule ModuloPesquisa.Repository do @impl true def list_pesquisador do - query = from p in Pesquisador, preload: [usuario: [:contato]] + query = from(p in Pesquisador, preload: [usuario: [:contato]]) Repo.replica().all(query) end @impl true def list_relatorios_pesquisa do - anuais = from ra in RelatorioAnualPesquisa, preload: [pesquisador: :usuario] - mensais = from rm in RelatorioMensalPesquisa, preload: [pesquisador: :usuario] - trimestrais = from rt in RelatorioTrimestralPesquisa, preload: [pesquisador: :usuario] + relatorios = from(rp in RelatorioPesquisa, preload: [pesquisador: :usuario]) - Repo.replica().all(anuais) ++ - Repo.replica().all(mensais) ++ - Repo.replica().all(trimestrais) + Repo.replica().all(relatorios) end @impl true def list_relatorios_pesquisa_from_pesquisador(id) do query = - from p in Pesquisador, + from(p in Pesquisador, where: p.id_publico == ^id, preload: [ - relatorios_anuais: [pesquisador: :usuario], - relatorios_mensais: [pesquisador: :usuario], - relatorios_trimestrais: [pesquisador: :usuario] + relatorios_pesquisa: [pesquisador: :usuario] ] + ) query |> Repo.replica().all() - |> Enum.map(&[&1.relatorios_anuais, &1.relatorios_mensais, &1.relatorios_trimestrais]) + |> Enum.map(&[&1.relatorios_pesquisa]) |> List.flatten() |> Enum.uniq() end + @impl true + def fetch_relatorio_pesquisa_by_id(id_publico) do + Repo.replica().get_by(RelatorioPesquisa, id_publico: id_publico) + end + @impl true def list_tag do Repo.replica().all(Tag) @@ -141,9 +140,10 @@ defmodule ModuloPesquisa.Repository do @impl true def list_tags_from_categoria(categoria_nome) do query = - from c in Categoria, + from(c in Categoria, where: c.nome == ^categoria_nome, preload: :tags + ) case Database.fetch_one(query) do {:error, :not_found} -> [] @@ -154,9 +154,10 @@ defmodule ModuloPesquisa.Repository do @impl true def list_tags_from_midia(midia_link) do query = - from m in Midia, + from(m in Midia, where: m.link == ^midia_link, preload: :tags + ) case Database.fetch_one(query) do {:error, :not_found} -> [] @@ -209,23 +210,9 @@ defmodule ModuloPesquisa.Repository do end @impl true - def upsert_relatorio_anual(rap \\ %RelatorioAnualPesquisa{}, attrs) do - rap - |> RelatorioAnualPesquisa.changeset(attrs) - |> Repo.insert_or_update() - end - - @impl true - def upsert_relatorio_mensal(rmp \\ %RelatorioMensalPesquisa{}, attrs) do - rmp - |> RelatorioMensalPesquisa.changeset(attrs) - |> Repo.insert_or_update() - end - - @impl true - def upsert_relatorio_trimestral(rtp \\ %RelatorioTrimestralPesquisa{}, attrs) do - rtp - |> RelatorioTrimestralPesquisa.changeset(attrs) + def upsert_relatorio_pesquisa(rp \\ %RelatorioPesquisa{}, attrs) do + rp + |> RelatorioPesquisa.changeset(attrs) |> Repo.insert_or_update() end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_anual.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_anual.ex new file mode 100644 index 00000000..39aa70ef --- /dev/null +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_anual.ex @@ -0,0 +1,32 @@ +defmodule ModuloPesquisa.Schemas.ConteudoAnual do + use Ecto.Schema + + import Ecto.Changeset + + @primary_key false + + @fields [ + :plano_de_trabalho, + :resumo, + :introducao, + :embasamento_teorico, + :resultados, + :atividades_academicas, + :atividades_nao_academicas, + :conclusao, + :referencias + ] + + embedded_schema do + for field <- @fields do + field field, :string + end + end + + @doc false + def changeset(conteudo, attrs) do + conteudo + |> cast(attrs, @fields) + |> validate_required([]) + end +end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_mensal.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_mensal.ex new file mode 100644 index 00000000..c6ac527a --- /dev/null +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_mensal.ex @@ -0,0 +1,32 @@ +defmodule ModuloPesquisa.Schemas.ConteudoMensal do + use Ecto.Schema + + import Ecto.Changeset + + @primary_key false + + @fields [ + :acao_planejamento, + :participacao_grupos_estudo, + :acoes_pesquisa, + :participacao_treinamentos, + :publicacao, + :previsao_acao_planejamento, + :previsao_participacao_grupos_estudo, + :previsao_participacao_treinamentos, + :previsao_acoes_pesquisa + ] + + embedded_schema do + for field <- @fields do + field field, :string + end + end + + @doc false + def changeset(conteudo, attrs) do + conteudo + |> cast(attrs, @fields) + |> validate_required([]) + end +end diff --git a/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_trimestral.ex b/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_trimestral.ex new file mode 100644 index 00000000..8e3f6cb3 --- /dev/null +++ b/apps/modulo_pesquisa/lib/modulo_pesquisa/schemas/conteudo_trimestral.ex @@ -0,0 +1,30 @@ +defmodule ModuloPesquisa.Schemas.ConteudoTrimestral do + use Ecto.Schema + + import Ecto.Changeset + + @primary_key false + + @fields [ + :titulo, + :introducao, + :embasamento_teorico, + :resultados_preliminares, + :atividades_academicas, + :atividades_nao_academicas, + :referencias + ] + + embedded_schema do + for field <- @fields do + field field, :string + end + end + + @doc false + def changeset(conteudo, attrs) do + conteudo + |> cast(attrs, @fields) + |> validate_required([]) + end +end diff --git a/apps/modulo_pesquisa/priv/repo/migrations/20230915181156_cria_relatorio_pesquisa.exs b/apps/modulo_pesquisa/priv/repo/migrations/20230915181156_cria_relatorio_pesquisa.exs new file mode 100644 index 00000000..0a2012a1 --- /dev/null +++ b/apps/modulo_pesquisa/priv/repo/migrations/20230915181156_cria_relatorio_pesquisa.exs @@ -0,0 +1,21 @@ +defmodule Database.Repo.Migrations.CriaRelatorioPesquisa do + use Ecto.Migration + + def change do + create table(:relatorio_pesquisa, primary_key: false) do + add :id_publico, :string + add :tipo, :string, null: false + add :conteudo, :map, null: false + add :data_inicio, :date, primary_key: true + add :data_fim, :date, primary_key: true + add :data_entrega, :date + add :data_limite, :date, null: false + add :link, :string + add :status, :string + + add :pesquisador_id, references(:pesquisador, column: :id_publico, type: :string), primary_key: true + + timestamps() + end + end +end diff --git a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_anual_test.exs b/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_anual_test.exs deleted file mode 100644 index 75239a0b..00000000 --- a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_anual_test.exs +++ /dev/null @@ -1,32 +0,0 @@ -defmodule Pescarte.ModuloPesquisa.Models.RelatorioAnualPesquisaTest do - use Database.DataCase, async: true - - import ModuloPesquisa.Factory - - alias ModuloPesquisa.Models.RelatorioAnualPesquisa - - @moduletag :unit - - test "alterações válidas no changeset com campos obrigatórios" do - attrs = %{ - ano: 2023, - mes: 1, - pesquisador_id: insert(:pesquisador).id_publico - } - - changeset = RelatorioAnualPesquisa.changeset(%RelatorioAnualPesquisa{}, attrs) - - assert changeset.valid? - assert get_change(changeset, :ano) == 2023 - assert get_change(changeset, :mes) == 1 - end - - test "alterações inválidas no changeset sem campos obrigatórios" do - changeset = RelatorioAnualPesquisa.changeset(%RelatorioAnualPesquisa{}, %{}) - - refute changeset.valid? - assert Keyword.get(changeset.errors, :ano) - assert Keyword.get(changeset.errors, :mes) - assert Keyword.get(changeset.errors, :pesquisador_id) - end -end diff --git a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_mensal_test.exs b/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_mensal_test.exs deleted file mode 100644 index ab2aec4a..00000000 --- a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_mensal_test.exs +++ /dev/null @@ -1,56 +0,0 @@ -defmodule Pescarte.ModuloPesquisa.Models.RelatorioMensalPesquisaTest do - use Database.DataCase, async: true - - import ModuloPesquisa.Factory - - alias ModuloPesquisa.Models.RelatorioMensalPesquisa - - @moduletag :unit - - test "alterações válidas no changeset com campos obrigatórios" do - pesquisador = insert(:pesquisador) - - attrs = %{ - ano: 2023, - mes: 1, - pesquisador_id: pesquisador.id_publico, - acao_planejamento: "Ação de Planejamento", - participacao_grupos_estudo: "Participação em Grupos de Estudo", - acoes_pesquisa: "Ações de Pesquisa", - participacao_treinamentos: "Participação em Treinamentos", - publicacao: "Publicação" - } - - changeset = RelatorioMensalPesquisa.changeset(%RelatorioMensalPesquisa{}, attrs) - - assert changeset.valid? - assert get_change(changeset, :ano) == 2023 - assert get_change(changeset, :mes) == 1 - assert get_change(changeset, :acao_planejamento) == "Ação de Planejamento" - - assert get_change(changeset, :participacao_grupos_estudo) == - "Participação em Grupos de Estudo" - - assert get_change(changeset, :acoes_pesquisa) == "Ações de Pesquisa" - assert get_change(changeset, :participacao_treinamentos) == "Participação em Treinamentos" - assert get_change(changeset, :publicacao) == "Publicação" - end - - test "alterações inválidas no changeset sem campos obrigatórios" do - pesquisador = insert(:pesquisador) - - attrs = %{ - mes: 1, - pesquisador_id: pesquisador.id_publico, - acao_planejamento: "Ação de Planejamento", - participacao_grupos_estudo: "Participação em Grupos de Estudo", - acoes_pesquisa: "Ações de Pesquisa", - participacao_treinamentos: "Participação em Treinamentos" - } - - changeset = RelatorioMensalPesquisa.changeset(%RelatorioMensalPesquisa{}, attrs) - - refute changeset.valid? - assert Keyword.get(changeset.errors, :ano) - end -end diff --git a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_pesquisa_test.exs b/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_pesquisa_test.exs new file mode 100644 index 00000000..f496d7d4 --- /dev/null +++ b/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_pesquisa_test.exs @@ -0,0 +1,33 @@ +defmodule Pescarte.ModuloPesquisa.Models.RelatorioPesquisaTest do + use Database.DataCase, async: true + + import ModuloPesquisa.Factory + + alias ModuloPesquisa.Models.RelatorioPesquisa + + @moduletag :unit + + test "alterações válidas no changeset com campos obrigatórios" do + attrs = %{ + data_inicio: ~D[2021-01-01], + data_fim: ~D[2021-12-31], + data_limite: ~D[2022-01-01], + status: :pendente, + tipo: Enum.random(~w(mensal trimestral anual)), + pesquisador_id: insert(:pesquisador).id_publico + } + + changeset = RelatorioPesquisa.changeset(%RelatorioPesquisa{}, attrs) + + assert changeset.valid? + end + + test "alterações inválidas no changeset sem campos obrigatórios" do + changeset = RelatorioPesquisa.changeset(%RelatorioPesquisa{}, %{}) + + refute changeset.valid? + assert Keyword.get(changeset.errors, :status) + assert Keyword.get(changeset.errors, :tipo) + assert Keyword.get(changeset.errors, :pesquisador_id) + end +end diff --git a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_trimestral_test.exs b/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_trimestral_test.exs deleted file mode 100644 index de19fd33..00000000 --- a/apps/modulo_pesquisa/test/modulo_pesquisa/models/relatorio_trimestral_test.exs +++ /dev/null @@ -1,34 +0,0 @@ -defmodule Pescarte.ModuloPesquisa.Models.RelatorioTrimestralPesquisaTest do - use Database.DataCase, async: true - - import ModuloPesquisa.Factory - - alias ModuloPesquisa.Models.RelatorioTrimestralPesquisa - - @moduletag :unit - - test "alterações válidas no changeset com campos obrigatórios" do - attrs = %{ - ano: 2023, - mes: 1, - pesquisador_id: insert(:pesquisador).id_publico, - status: :entregue - } - - changeset = RelatorioTrimestralPesquisa.changeset(%RelatorioTrimestralPesquisa{}, attrs) - - assert changeset.valid? - assert get_change(changeset, :ano) == 2023 - assert get_change(changeset, :mes) == 1 - assert get_change(changeset, :status) == :entregue - end - - test "alterações inválidas no changeset sem campos obrigatórios" do - changeset = RelatorioTrimestralPesquisa.changeset(%RelatorioTrimestralPesquisa{}, %{}) - - refute changeset.valid? - assert Keyword.get(changeset.errors, :ano) - assert Keyword.get(changeset.errors, :mes) - assert Keyword.get(changeset.errors, :pesquisador_id) - end -end diff --git a/apps/modulo_pesquisa/test/modulo_pesquisa/repository_test.exs b/apps/modulo_pesquisa/test/modulo_pesquisa/repository_test.exs index 19b5d5f7..ec1b155b 100644 --- a/apps/modulo_pesquisa/test/modulo_pesquisa/repository_test.exs +++ b/apps/modulo_pesquisa/test/modulo_pesquisa/repository_test.exs @@ -144,36 +144,14 @@ defmodule Pescarte.ModuloPesquisa.RepositoryTest do end end - describe "upsert_relatorio_anual/1" do + describe "upsert_relatorio/1" do test "quando os parâmetros são inválidos" do - assert {:error, _changeset} = Repository.upsert_relatorio_anual(%{}) + assert {:error, _changeset} = Repository.upsert_relatorio_pesquisa(%{}) end test "quando os parâmetros são válidos" do - attrs = fixture(:relatorio_anual) - assert {:ok, _} = Repository.upsert_relatorio_anual(attrs) - end - end - - describe "upsert_relatorio_mensal/1" do - test "quando os parâmetros são inválidos" do - assert {:error, _changeset} = Repository.upsert_relatorio_mensal(%{}) - end - - test "quando os parâmetros são válidos" do - attrs = fixture(:relatorio_mensal) - assert {:ok, _} = Repository.upsert_relatorio_mensal(attrs) - end - end - - describe "upsert_relatorio_trimestral/1" do - test "quando os parâmetros são inválidos" do - assert {:error, _changeset} = Repository.upsert_relatorio_trimestral(%{}) - end - - test "quando os parâmetros são válidos" do - attrs = fixture(:relatorio_trimestral) - assert {:ok, _} = Repository.upsert_relatorio_anual(attrs) + attrs = fixture(:relatorio) + assert {:ok, _} = Repository.upsert_relatorio_pesquisa(attrs) end end @@ -251,12 +229,54 @@ defmodule Pescarte.ModuloPesquisa.RepositoryTest do test "quando há registros" do pesquisador = insert(:pesquisador) - insert(:relatorio_anual, pesquisador_id: pesquisador.id_publico) - insert_list(4, :relatorio_mensal, pesquisador_id: pesquisador.id_publico) - insert_list(2, :relatorio_trimestral, pesquisador_id: pesquisador.id_publico) + + insert(:relatorio, %{ + pesquisador_id: pesquisador.id_publico, + data_inicio: ~D[2023-01-01], + data_fim: ~D[2023-12-10], + data_limite: ~D[2023-12-10], + status: :pendente, + tipo: "anual" + }) + + insert(:relatorio, %{ + pesquisador_id: pesquisador.id_publico, + data_inicio: ~D[2023-01-01], + data_fim: ~D[2023-02-15], + data_limite: ~D[2023-02-15], + status: :pendente, + tipo: "mensal" + }) + + insert(:relatorio, %{ + pesquisador_id: pesquisador.id_publico, + data_inicio: ~D[2023-02-01], + data_fim: ~D[2023-03-15], + data_limite: ~D[2023-03-15], + status: :pendente, + tipo: "mensal" + }) + + insert(:relatorio, %{ + pesquisador_id: pesquisador.id_publico, + data_inicio: ~D[2023-01-01], + data_fim: ~D[2023-03-15], + data_limite: ~D[2023-03-15], + status: :pendente, + tipo: "trimestral" + }) + + insert(:relatorio, %{ + pesquisador_id: pesquisador.id_publico, + data_inicio: ~D[2023-03-01], + data_fim: ~D[2023-06-15], + data_limite: ~D[2023-06-15], + status: :pendente, + tipo: "trimestral" + }) relatorios = Repository.list_relatorios_pesquisa_from_pesquisador(pesquisador.id_publico) - assert length(relatorios) == 7 + assert length(relatorios) == 5 end end diff --git a/apps/modulo_pesquisa/test/support/factory.ex b/apps/modulo_pesquisa/test/support/factory.ex index 98b7e05d..84567d17 100644 --- a/apps/modulo_pesquisa/test/support/factory.ex +++ b/apps/modulo_pesquisa/test/support/factory.ex @@ -8,9 +8,7 @@ defmodule ModuloPesquisa.Factory do alias ModuloPesquisa.Models.Midia.Tag alias ModuloPesquisa.Models.NucleoPesquisa alias ModuloPesquisa.Models.Pesquisador - alias ModuloPesquisa.Models.RelatorioAnualPesquisa - alias ModuloPesquisa.Models.RelatorioMensalPesquisa - alias ModuloPesquisa.Models.RelatorioTrimestralPesquisa + alias ModuloPesquisa.Models.RelatorioPesquisa def campus_factory do %Campus{ @@ -78,63 +76,16 @@ defmodule ModuloPesquisa.Factory do } end - def relatorio_anual_factory do - %RelatorioAnualPesquisa{ + def relatorio_factory do + %RelatorioPesquisa{ + tipo: Enum.random(~w(mensal bimestral trimestral anual)), + data_inicio: ~D[2023-01-01], + data_fim: ~D[2023-02-15], data_entrega: ~D[2023-07-30], + data_limite: ~D[2023-02-15], id_publico: Nanoid.generate_non_secure(), - plano_de_trabalho: "Plano de Trabalho", - resumo: "Resumo", - introducao: "Introdução", - embasamento_teorico: "Embasamento Teórico", - resultados: "Resultos", - atividades_academicas: "Atividades Acadêmicas", - atividades_nao_academicas: "Atividades não Acadêmicas", - conclusao: "Conclusão", - referencias: "Referências", - ano: sequence(:ano, &Kernel.+(2020, &1)), - mes: 4, - link: "https//datalake.com/relatorio_anual", - pesquisador_id: insert(:pesquisador).id_publico, - status: :pendente - } - end - - def relatorio_mensal_factory do - %RelatorioMensalPesquisa{ - data_entrega: ~D[2023-07-30], - id_publico: Nanoid.generate_non_secure(), - acao_planejamento: "Ação de planejamento", - participacao_grupos_estudo: "Participação em grupos de estudo", - acoes_pesquisa: "Ações de pesquisa", - participacao_treinamentos: "Participação em Treinamentos", - publicacao: "Publicação", - previsao_acoes_pesquisa: "Ações de Pesquisa futura", - previsao_acao_planejamento: "Ação de Planejamento futura", - previsao_participacao_grupos_estudo: "Participação em grupos de estudos futura", - previsao_participacao_treinamentos: "Participação em trinamentos futura", - ano: 2023, - mes: sequence(:mes, & &1), - link: "https//datalake.com/relatorio_anual", - pesquisador_id: insert(:pesquisador).id_publico, - status: :pendente - } - end - - def relatorio_trimestral_factory do - %RelatorioTrimestralPesquisa{ - data_entrega: ~D[2023-07-30], - id_publico: Nanoid.generate_non_secure(), - titulo: "Titutlo", - resumo: "Resumo", - introducao: "Introdução", - embasamento_teorico: "Embasamento Teórico", - resultados_preliminares: "Resultados preliminares", - atividades_academicas: "Atividades Acadêmicas", - atividades_nao_academicas: "Atividades não Acadêmicas", - referencias: "Referências", - ano: 2023, - mes: sequence(:mes, & &1), - link: "https//datalake.com/relatorio_anual", + link: "https//datalake.com/relatorio", + conteudo_mensal: %{}, pesquisador_id: insert(:pesquisador).id_publico, status: :pendente } diff --git a/apps/plataforma_digital/assets/css/app.scss b/apps/plataforma_digital/assets/css/app.scss index 307c2c96..6da93a31 100644 --- a/apps/plataforma_digital/assets/css/app.scss +++ b/apps/plataforma_digital/assets/css/app.scss @@ -178,8 +178,8 @@ footer { // Com autenticação @import "./pages/app/researcher/profile.scss"; @import "./pages/app/researcher/listagem_pesquisador.scss"; -@import "./pages/app/researcher/relatorio/mensal.scss"; @import "./pages/app/researcher/relatorio/list_report.scss"; +@import "./pages/app/researcher/relatorio/report.scss"; // Páginas de Erros @import "./errors/404.scss"; diff --git a/apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/mensal.scss b/apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/mensal.scss deleted file mode 100644 index 4a473526..00000000 --- a/apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/mensal.scss +++ /dev/null @@ -1,24 +0,0 @@ -.monthly-report-wrapper { - @apply w-full; - - padding: 0 2.5rem; - overflow-y: scroll; - height: calc(100vh - $footer-height); - - > h1 { - margin: 2.5rem 0; - } - - > form .report-field { - height: max-content; - margin-bottom: 2.25rem; - - h3 { - margin-bottom: 0.75rem; - } - - textarea { - min-height: 12rem; - } - } -} diff --git a/apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/report.scss b/apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/report.scss new file mode 100644 index 00000000..99c252d5 --- /dev/null +++ b/apps/plataforma_digital/assets/css/pages/app/researcher/relatorio/report.scss @@ -0,0 +1,38 @@ +.report-wrapper { + @apply w-full; + + padding: 0 2.5rem; + overflow-y: scroll; + height: calc(100vh - $footer-height); + + >h1 { + margin: 2.5rem 0; + } + + >form { + .buttons-wrapper { + display: flex; + margin-bottom: 2rem; + + :nth-child(2) { + margin-left: 1rem; + } + } + + + .report-field { + height: max-content; + margin-bottom: 2.25rem; + + h3 { + margin-bottom: 0.75rem; + } + + textarea { + width: 100%; + min-height: 12rem; + } + + } + } +} \ No newline at end of file diff --git a/apps/plataforma_digital/lib/plataforma_digital/design_system.ex b/apps/plataforma_digital/lib/plataforma_digital/design_system.ex index f0510ef2..a9f4ce12 100644 --- a/apps/plataforma_digital/lib/plataforma_digital/design_system.ex +++ b/apps/plataforma_digital/lib/plataforma_digital/design_system.ex @@ -34,11 +34,11 @@ defmodule PlataformaDigital.DesignSystem do <.text size="h1"> Lorem ipsum dolor sit amet """ - attr :size, :string, values: @text_sizes, required: true - attr :color, :string, default: "text-black-80" - attr :class, :string, required: false, default: "" + attr(:size, :string, values: @text_sizes, required: true) + attr(:color, :string, default: "text-black-80") + attr(:class, :string, required: false, default: "") - slot :inner_block + slot(:inner_block) def text(%{size: "h" <> _} = assigns) do ~H""" @@ -114,13 +114,14 @@ defmodule PlataformaDigital.DesignSystem do <.button style="primary" submit> Submissão """ - attr :style, :string, values: ~w(primary secondary link), required: true - attr :submit, :boolean, default: false - attr :class, :string, default: "" - attr :click, :string, default: "", doc: ~s(the click event to handle) - attr :rest, :global, doc: ~s(used for phoenix events like "phx-target") + attr(:style, :string, values: ~w(primary secondary link), required: true) + attr(:submit, :boolean, default: false) + attr(:disabled, :boolean, default: false) + attr(:class, :string, default: "") + attr(:click, :string, default: "", doc: ~s(the click event to handle)) + attr(:rest, :global, doc: ~s(used for phoenix events like "phx-target")) - slot :inner_block + slot(:inner_block) def button(assigns) do ~H""" @@ -128,6 +129,7 @@ defmodule PlataformaDigital.DesignSystem do type={if @submit, do: "submit", else: "button"} class={["btn", "btn-#{@style}", @class]} phx-click={@click} + disabled={@disabled} {@rest} > <.text :if={@style == "primary"} size="base" color="text-white-100"> @@ -173,12 +175,12 @@ defmodule PlataformaDigital.DesignSystem do <.checkbox id="send-emails" label="Deseja receber nossos emails?" checked /> """ - attr :id, :string, required: false - attr :checked, :boolean, default: false - attr :disabled, :boolean, default: false - attr :label, :string, required: false, default: "" - attr :field, Phoenix.HTML.FormField - attr :name, :string + attr(:id, :string, required: false) + attr(:checked, :boolean, default: false) + attr(:disabled, :boolean, default: false) + attr(:label, :string, required: false, default: "") + attr(:field, Phoenix.HTML.FormField) + attr(:name, :string) def checkbox(%{field: %Phoenix.HTML.FormField{}} = assigns) do assigns @@ -213,13 +215,13 @@ defmodule PlataformaDigital.DesignSystem do <.checkbox id="send-emails" label="Deseja receber nossos emails?" checked /> """ - attr :id, :string, required: true - attr :name, :string - attr :disabled, :boolean, default: false - attr :checked, :boolean, default: false - attr :field, Phoenix.HTML.FormField + attr(:id, :string, required: true) + attr(:name, :string) + attr(:disabled, :boolean, default: false) + attr(:checked, :boolean, default: false) + attr(:field, Phoenix.HTML.FormField) - slot :label, required: true + slot(:label, required: true) def radio(%{field: %Phoenix.HTML.FormField{}} = assigns) do assigns @@ -270,17 +272,17 @@ defmodule PlataformaDigital.DesignSystem do <.text_input name="password" label="Senha" type="password" /> """ - attr :id, :string, default: nil - attr :type, :string, default: "text", values: ~w(text password) - attr :placeholder, :string, required: false, default: "" - attr :value, :string, required: false - attr :mask, :string, required: false, default: nil - attr :valid, :boolean, required: false, default: nil - attr :label, :string, default: nil - attr :field, Phoenix.HTML.FormField - attr :name, :string + attr(:id, :string, default: nil) + attr(:type, :string, default: "text", values: ~w(date hidden text password)) + attr(:placeholder, :string, required: false, default: "") + attr(:value, :string, required: false) + attr(:mask, :string, required: false, default: nil) + attr(:valid, :boolean, required: false, default: nil) + attr(:label, :string, default: nil) + attr(:field, Phoenix.HTML.FormField) + attr(:name, :string) - attr :rest, :global, include: ~w(autocomplete disabled pattern placeholder readonly required) + attr(:rest, :global, include: ~w(autocomplete disabled pattern placeholder readonly required)) def text_input(%{field: %Phoenix.HTML.FormField{}} = assigns) do assigns @@ -316,14 +318,16 @@ defmodule PlataformaDigital.DesignSystem do defp text_input_state(false), do: "input-error" defp text_input_state(true), do: "input-success" - attr :id, :string, default: nil - attr :placeholder, :string, required: false, default: "" - attr :value, :string, default: "" - attr :valid, :boolean, required: false, default: nil - attr :field, Phoenix.HTML.FormField - attr :class, :string, default: "" + attr(:id, :string, default: nil) + attr(:name, :string, default: nil) + attr(:disabled, :boolean, default: false) + attr(:placeholder, :string, required: false, default: "") + attr(:value, :string, default: "") + attr(:valid, :boolean, required: false, default: nil) + attr(:field, Phoenix.HTML.FormField) + attr(:class, :string, default: "") - slot :label, required: false + slot(:label, required: false) def text_area(%{field: %Phoenix.HTML.FormField{}} = assigns) do assigns @@ -338,7 +342,9 @@ defmodule PlataformaDigital.DesignSystem do