Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/decidim kids #9

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
jobs:
test:
name: Test
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:11
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
/public/packs-test
/public/sw.js
/public/sw.js.map
public/sw.js.LICENSE.txt
public/sw.js.br
public/sw.js.gz
public/sw.js.map.br
public/sw.js.map.gz

# Ignore node modules
/node_modules
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ gem "decidim", DECIDIM_VERSION
# gem "decidim-templates", DECIDIM_VERSION

gem "decidim-decidim_awesome"
gem "decidim-kids", git: "https://github.com/AjuntamentdeBarcelona/decidim-module-kids"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer", branch: "main"

gem "bootsnap", "~> 1.3"
Expand Down
11 changes: 11 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
GIT
remote: https://github.com/AjuntamentdeBarcelona/decidim-module-kids
revision: df16cf4de13c306348761d850d19815c8221874e
specs:
decidim-kids (0.2.0)
decidim-core (>= 0.28, < 0.29)
decidim-system (>= 0.28, < 0.29)
decidim-verifications (>= 0.28, < 0.29)
deface (>= 1.5)

GIT
remote: https://github.com/mainio/decidim-module-term_customizer
revision: 9133eea57ebfc4164b640efd1ac6b9ca1628c793
Expand Down Expand Up @@ -887,6 +897,7 @@ DEPENDENCIES
decidim (= 0.28.2)
decidim-decidim_awesome
decidim-dev (= 0.28.2)
decidim-kids!
decidim-term_customizer!
figaro (~> 1.2)
letter_opener_web (~> 2.0)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true
# This migration comes from decidim_kids (originally 20221017110422)

class CreateOrganizationMinorsConfigs < ActiveRecord::Migration[5.2]
def change
create_table :decidim_kids_organization_configs do |t|
t.integer :decidim_organization_id, null: false, index: { name: "index_decidim_kids_organization" }
t.boolean :enable_minors_participation, null: false, default: false
t.integer :minimum_minor_age, null: false, default: 10
t.integer :maximum_minor_age, null: false, default: 13
t.string :minors_authorization
t.string :tutors_authorization
t.integer :maximum_minor_accounts, null: false, default: 3
t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# This migration comes from decidim_kids (originally 20221024124523)

class CreateDecidimKidsMinorAccounts < ActiveRecord::Migration[6.1]
def change
create_table :decidim_kids_minor_accounts do |t|
t.references :decidim_tutor, null: false, index: true, foreign_key: { to_table: "decidim_users" }
t.references :decidim_minor, null: false, index: true, foreign_key: { to_table: "decidim_users" }
t.timestamps
end

add_index :decidim_kids_minor_accounts, [:decidim_tutor_id, :decidim_minor_id], unique: true, name: "decidim_kids_minor_accounts_unique_tutor_and_minor_ids"
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true
# This migration comes from decidim_kids (originally 20221027211859)

class CreateDecidimKidsMinorData < ActiveRecord::Migration[6.1]
def change
create_table :decidim_kids_minor_data do |t|
t.references :decidim_user, null: false, index: true
t.string :name # encrypted
t.string :birthday # encrypted
t.string :email # encrypted
t.jsonb :extra_data, null: false, default: {}
t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true
# This migration comes from decidim_kids (originally 20221127103636)

class CreateImpersonationMinorLogs < ActiveRecord::Migration[6.1]
def change
create_table :decidim_kids_impersonation_minor_logs do |t|
t.references :decidim_tutor, index: true
t.references :decidim_minor, index: true
t.datetime :started_at
t.datetime :ended_at
t.datetime :expired_at

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# This migration comes from decidim_kids (originally 20221220132306)

class CreateDecidimKidsParticipatorySpacesMinorsConfigs < ActiveRecord::Migration[6.1]
def change
create_table :decidim_kids_participatory_spaces_minors_configs do |t|
t.string :access_type, null: false, default: "all"
t.string :authorization
t.integer :max_age, null: false, default: 16
t.references :participatory_space, polymorphic: true, index: { name: "index_minor_config_on_space_type_and_id" }
t.timestamps
end
end
end
61 changes: 60 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading