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(form-system-backend): Add functionality to create and edit custom lists #15352

Merged
merged 92 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
167a4ca
form builder 'init'
Hyosam Feb 1, 2024
4615d90
Added functionality for relevant parties
Hyosam Feb 5, 2024
958e21b
Merge branch 'main' of https://github.com/island-is/island.is into fo…
Hyosam Feb 5, 2024
f795053
redirect to the correct url when creating a new form
Hyosam Feb 5, 2024
fc7f69d
removed secret from comment
Hyosam Feb 5, 2024
f8818bd
chore: nx format:write update dirty files
andes-it Feb 5, 2024
e1f667b
Property number component
Hyosam Feb 13, 2024
74464ff
Fixed the header
Hyosam Feb 13, 2024
6f8159e
Merge branch 'form-builder' of https://github.com/island-is/island.is…
Hyosam Feb 19, 2024
d7b708d
Reverted to next 13.3.0
Hyosam Feb 19, 2024
9666db4
Deleted the e2e project, updated to project to adhere to strict types…
Hyosam Feb 21, 2024
ba301da
chore: nx format:write update dirty files
andes-it Feb 21, 2024
ffe2b07
Started implementing zod validation
Hyosam Feb 22, 2024
1a988c7
Merge branch 'form-builder' of https://github.com/island-is/island.is…
Hyosam Feb 22, 2024
5f7f8f9
chore: nx format:write update dirty files
andes-it Feb 22, 2024
287bea8
Generated a nestjs client from our openapi schema
Hyosam Feb 23, 2024
e9b22be
Generated a client and created a domain client for graphql
Hyosam Feb 29, 2024
3ae8a54
Update Form, Group, Input, and Step DTOs
Hyosam Mar 4, 2024
32b2884
Refactor input settings in FormsService and Input model
Hyosam Mar 5, 2024
0bf07a0
Update API and authentication configurations
Hyosam Mar 5, 2024
c317d03
Added form-system client and module to the app/api and added a codege…
Hyosam Mar 6, 2024
0703fd8
Remove form-system module and add formSystemNavigation to masterNavig…
Hyosam Mar 11, 2024
1593e6a
Merge branches 'form-system' and 'main' of https://github.com/island-…
Hyosam Mar 11, 2024
2387fc7
Refactor form-system API code and formBuilder into portals/admin
Hyosam Mar 12, 2024
323ad38
Fixng typing erros in form system graphql domain
saevarma Mar 12, 2024
61a8469
Added another Object type and a bunch of inputTypes in order for code…
Hyosam Mar 13, 2024
8a5e637
Update import statements for LanguageTypeInput
Hyosam Mar 14, 2024
fd12938
Merge branch 'main' of https://github.com/island-is/island.is into fo…
Hyosam Mar 19, 2024
59ca682
Update form system module and related files
Hyosam Mar 19, 2024
4a54d78
Merge branch 'main' of https://github.com/island-is/island.is into fo…
Hyosam Mar 19, 2024
af195c6
Update FormSystemClient.config and Forms component
Hyosam Mar 20, 2024
1767ba6
Saving progress
Hyosam Apr 8, 2024
27aa9ab
Working version. Current issue: inputsettings are not being saved due…
Hyosam Apr 23, 2024
55226bc
took out the formsysteminputsettings and replaced it with a graphqlTy…
Hyosam Apr 23, 2024
d8a15cf
spring cleaning and creating dependencies within the form
Hyosam Apr 24, 2024
21edcb4
Merge branch 'main' of https://github.com/island-is/island.is into fo…
Hyosam Apr 24, 2024
5f92d53
removed form-builder app
Hyosam Apr 24, 2024
291432c
added required feature to preview items and fixed nextjs version
Hyosam Apr 24, 2024
dbd5161
Merge branch 'main' of https://github.com/island-is/island.is into fo…
Hyosam Apr 26, 2024
e2cb88e
chore: charts update dirty files
andes-it Apr 26, 2024
4aa133e
chore: nx format:write update dirty files
andes-it Apr 26, 2024
1c327b4
form-system backend initial commit
OlafurGeorg May 24, 2024
1e91ab6
initial configuration
OlafurGeorg May 27, 2024
5dd8522
adjust for PR
OlafurGeorg May 30, 2024
c075285
fix lint warnings
OlafurGeorg Jun 4, 2024
8943f66
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Jun 4, 2024
870bda3
add models and modules
OlafurGeorg Jun 14, 2024
24eca05
helstu módel, services og controllerar
OlafurGeorg Jun 21, 2024
c1d0498
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Jun 21, 2024
0f87dcd
make lint satisfied
OlafurGeorg Jun 21, 2024
611e42c
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Jun 26, 2024
08f76df
Add functionality to create and edit custom lists
OlafurGeorg Jun 26, 2024
a55ed63
application part start
OlafurGeorg Jun 26, 2024
d8722cf
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Jun 27, 2024
7d0c9f0
change step to section and group to page
OlafurGeorg Jun 27, 2024
8944cdd
tiny lint things
OlafurGeorg Jun 27, 2024
87a0636
change naming of page to screen
OlafurGeorg Jun 27, 2024
65acc75
changed naming of input to field
OlafurGeorg Jun 28, 2024
abde5f7
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Jun 28, 2024
86581ee
fix lint warnings
OlafurGeorg Jun 28, 2024
1b56c1e
change naming of input to field
OlafurGeorg Jun 28, 2024
e0dcd22
work on application part
OlafurGeorg Jun 28, 2024
e0ec76f
change tablenames to singular
OlafurGeorg Jun 28, 2024
6a3c7d9
changed naming of testimony to certification
OlafurGeorg Jul 1, 2024
faf1632
fixing apiproperty configurations
OlafurGeorg Jul 2, 2024
c6e2231
changed naming of urlName to slug
OlafurGeorg Jul 2, 2024
6000f59
introduce lodash pick
OlafurGeorg Jul 4, 2024
976f897
refactor vegna PR
OlafurGeorg Jul 5, 2024
449fbf9
add openapi.yaml build
OlafurGeorg Jul 5, 2024
e6f67ee
Refactor project setup
baering Jul 5, 2024
ff69ada
Add class validation for CreateFormDto
baering Jul 5, 2024
290114f
add class-validation
OlafurGeorg Jul 10, 2024
23537c3
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Jul 10, 2024
410c3d3
use predefined types for cases in switch
OlafurGeorg Jul 10, 2024
6908cb1
Fix build
baering Jul 18, 2024
9fc825a
Fix lint
baering Jul 18, 2024
a70e211
Update tags
baering Jul 18, 2024
73743be
Remove empty test files
baering Jul 18, 2024
d171d4f
Skip tests until implemented
baering Jul 18, 2024
1ccf170
Add advania as codeowner for new service
baering Jul 18, 2024
b221afd
Merge branch 'main' of https://github.com/island-is/island.is into fo…
OlafurGeorg Aug 8, 2024
2cdf46c
add infra definition
OlafurGeorg Aug 8, 2024
9f769c9
Merge branch 'form-system-backend-client' of https://github.com/islan…
OlafurGeorg Aug 8, 2024
f2689ac
add the service to uber-charts
OlafurGeorg Aug 9, 2024
f0078dd
chore: charts update dirty files
andes-it Aug 9, 2024
99dc205
update grantNamespaces
OlafurGeorg Aug 9, 2024
1667fa7
Merge branch 'form-system-backend-client' of https://github.com/islan…
OlafurGeorg Aug 9, 2024
a49ae84
chore: charts update dirty files
andes-it Aug 9, 2024
74341f4
added seed instruction to DLS
OlafurGeorg Aug 9, 2024
b5c91de
Merge branch 'form-system-backend-client' of https://github.com/islan…
OlafurGeorg Aug 9, 2024
01ef9e2
chore: charts update dirty files
andes-it Aug 9, 2024
eb4cc5e
Merge branch 'main' into form-system-backend-client
kodiakhq[bot] Aug 9, 2024
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
18 changes: 18 additions & 0 deletions apps/services/form-system/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
7 changes: 7 additions & 0 deletions apps/services/form-system/.sequelizerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path')

module.exports = {
config: path.resolve('sequelize.config.js'),
'seeders-path': path.resolve('seeders'),
'migrations-path': path.resolve('migrations'),
}
17 changes: 17 additions & 0 deletions apps/services/form-system/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: '3.3'

services:
db_reference_backend:
image: public.ecr.aws/docker/library/postgres:15.3-alpine
container_name: form-system
networks:
- local
environment:
- POSTGRES_DB=form-system
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
ports:
- 5432:5432

networks:
local:
11 changes: 11 additions & 0 deletions apps/services/form-system/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: 'services-form-system',
preset: '../../../jest.preset.js',
testEnvironment: 'node',
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../../coverage/apps/services/form-system',
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
'use strict'

module.exports = {
async up(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.createTable(
'organizations',
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
{
id: {
type: Sequelize.UUID,
primaryKey: true,
allowNull: false,
defaultValue: Sequelize.UUIDV4,
},
name: {
type: Sequelize.JSON,
allowNull: false,
},
created: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
modified: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
national_id: {
type: Sequelize.STRING,
allowNull: false,
},
},
{ transaction: t },
),
)
},

async down(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.dropTable('organizations', { transaction: t }),
)
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
'use strict'

module.exports = {
async up(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.createTable(
'forms',
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
{
id: {
type: Sequelize.UUID,
primaryKey: true,
allowNull: false,
defaultValue: Sequelize.UUIDV4,
},
name: {
type: Sequelize.JSON,
allowNull: false,
},
url_name: {
type: Sequelize.STRING,
allowNull: false,
defaultValue: '',
},
created: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
modified: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
invalidation_date: {
type: Sequelize.DATE,
allowNull: true,
},
is_translated: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false,
},
application_days_to_remove: {
type: Sequelize.INTEGER,
allowNull: false,
defaultValue: 60,
},
derived_from: {
type: Sequelize.INTEGER,
allowNull: false,
},
stop_progress_on_validating_screen: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: true,
},
completed_message: {
type: Sequelize.JSON,
allowNull: true,
},
organization_id: {
type: Sequelize.UUID,
allowNull: false,
references: {
model: 'organizations',
key: 'id',
},
},
},
{ transaction: t },
),
)
},

async down(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.dropTable('forms', { transaction: t }),
)
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
'use strict'

module.exports = {
async up(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.createTable(
'sections',
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
{
id: {
type: Sequelize.UUID,
primaryKey: true,
allowNull: false,
defaultValue: Sequelize.UUIDV4,
},
name: {
type: Sequelize.JSON,
allowNull: false,
},
created: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
modified: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
section_type: {
type: Sequelize.DataTypes.ENUM(
'premises',
'parties',
'input',
'payment',
),
allowNull: false,
defaultValue: 'input',
},
display_order: {
type: Sequelize.INTEGER,
allowNull: false,
},
waiting_text: {
type: Sequelize.JSON,
allowNull: true,
},
is_hidden: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false,
},
call_ruleset: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false,
},
is_completed: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false,
},
form_id: {
type: Sequelize.UUID,
onDelete: 'CASCADE',
allowNull: false,
references: {
model: 'forms',
key: 'id',
},
},
},
{ transaction: t },
),
)
},

async down(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.dropTable('sections', { transaction: t }),
)
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
'use strict'

module.exports = {
async up(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.createTable(
'screens',
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
{
id: {
type: Sequelize.UUID,
primaryKey: true,
allowNull: false,
defaultValue: Sequelize.UUIDV4,
},
name: {
type: Sequelize.JSON,
allowNull: false,
},
created: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
modified: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
display_order: {
type: Sequelize.INTEGER,
allowNull: false,
},
is_hidden: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false,
},
multiset: {
type: Sequelize.INTEGER,
allowNull: false,
},
section_id: {
type: Sequelize.UUID,
onDelete: 'CASCADE',
allowNull: false,
references: {
model: 'sections',
key: 'id',
},
},
},
{ transaction: t },
),
)
},

async down(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.dropTable('screens', { transaction: t }),
)
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
'use strict'

module.exports = {
async up(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.createTable(
'form_applicants',
OlafurGeorg marked this conversation as resolved.
Show resolved Hide resolved
{
id: {
type: Sequelize.UUID,
primaryKey: true,
allowNull: false,
defaultValue: Sequelize.UUIDV4,
},
name: {
type: Sequelize.JSON,
allowNull: false,
},
created: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
modified: {
type: 'TIMESTAMP WITH TIME ZONE',
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP'),
allowNull: false,
},
applicant_type: {
type: Sequelize.ENUM(
'individual',
'individualWithMandateFromIndividual',
'individualWithMandateFromLegalEntity',
'individualWithProcuration',
'individualGivingMandate',
'legalEntity',
),
allowNull: false,
defaultValue: 'individual',
},
form_id: {
type: Sequelize.UUID,
allowNull: false,
references: {
model: 'forms',
key: 'id',
},
},
},
{ transaction: t },
),
)
},

async down(queryInterface, Sequelize) {
return queryInterface.sequelize.transaction((t) =>
queryInterface.dropTable('form_applicants', { transaction: t }),
)
},
}
Loading
Loading