generated from alecodes/base-template
fix: allow to select deseambiguator type in source form
This commit is contained in:
parent
2be95765e8
commit
fff2bc3b3a
5 changed files with 39 additions and 25 deletions
|
|
@ -53,7 +53,7 @@ SET
|
||||||
:date,
|
:date,
|
||||||
:time,
|
:time,
|
||||||
:og_desambiguator,
|
:og_desambiguator,
|
||||||
$extra_data :: jsonb ->> 'lg_uid'
|
:lg_id
|
||||||
);
|
);
|
||||||
|
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
|
|
@ -71,5 +71,7 @@ VALUES
|
||||||
:text,
|
:text,
|
||||||
:lg_id :: int,
|
:lg_id :: int,
|
||||||
:date :: date + :time :: time
|
:date :: date + :time :: time
|
||||||
) RETURNING 'redirect' AS component,
|
)
|
||||||
|
RETURNING
|
||||||
|
'redirect' AS component,
|
||||||
$return_link AS link;
|
$return_link AS link;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ SELECT
|
||||||
'Source' AS label,
|
'Source' AS label,
|
||||||
'select' AS TYPE,
|
'select' AS TYPE,
|
||||||
TRUE AS required,
|
TRUE AS required,
|
||||||
TRUE AS searchable,
|
|
||||||
'Select...' AS empty_option,
|
'Select...' AS empty_option,
|
||||||
(
|
(
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
public.sources(name, uid, uri)
|
public.sources(name, uid, uri, desambiguator_type_id)
|
||||||
VALUES
|
VALUES
|
||||||
(:name, :uid, :uri)
|
(:name, :uid, :uri, :desambiguator_type_id :: int)
|
||||||
RETURNING 'redirect' AS component, 'index.sql' AS link
|
RETURNING
|
||||||
;
|
'redirect' AS component,
|
||||||
|
'index.sql' AS link;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,19 @@ SELECT
|
||||||
1 AS minlength,
|
1 AS minlength,
|
||||||
TRUE AS required;
|
TRUE AS required;
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
'desambiguator_type_id' AS name,
|
||||||
|
'Deseambiguator Type' AS label,
|
||||||
|
'select' AS TYPE,
|
||||||
|
TRUE AS required,
|
||||||
|
'Select...' AS empty_option,
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
jsonb_agg(jsonb_build_object('label', name, 'value', id))
|
||||||
|
FROM
|
||||||
|
public.desambiguator_types
|
||||||
|
) AS options;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
'uri' AS name,
|
'uri' AS name,
|
||||||
'URI' AS label;
|
'URI' AS label;
|
||||||
|
|
@ -38,6 +51,12 @@ SELECT
|
||||||
TRUE AS search;
|
TRUE AS search;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
*
|
src.id,
|
||||||
|
src.name,
|
||||||
|
src.uid,
|
||||||
|
dts.name AS "Deseambiguator Type",
|
||||||
|
src.uri,
|
||||||
|
to_char(src.created_at, 'YYYY-MM-DD HH12:MI:SS TZ') AS "Created At"
|
||||||
FROM
|
FROM
|
||||||
public.sources;
|
public.sources AS src
|
||||||
|
INNER JOIN public.desambiguator_types AS dts ON src.desambiguator_type_id = dts.id;
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,7 @@
|
||||||
"theme": "dark",
|
"theme": "dark",
|
||||||
"css": "/style.css",
|
"css": "/style.css",
|
||||||
"menu_item": [
|
"menu_item": [
|
||||||
{ "link": "index.sql", "title": "Home" },
|
{ "icon": "home", "link": "/", "title": "Home" },
|
||||||
{
|
|
||||||
"title": "Dependencies",
|
|
||||||
"icon": "brand-stackshare",
|
|
||||||
"submenu": [
|
|
||||||
{
|
{
|
||||||
"link": "/logic_groups/index.sql",
|
"link": "/logic_groups/index.sql",
|
||||||
"title": "Logic Groups",
|
"title": "Logic Groups",
|
||||||
|
|
@ -23,6 +19,4 @@
|
||||||
"icon": "external-link"
|
"icon": "external-link"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue