|
@@ -1,6 +1,8 @@
|
|
|
CREATE OR REPLACE VIEW view_federation_structures
|
|
CREATE OR REPLACE VIEW view_federation_structures
|
|
|
AS
|
|
AS
|
|
|
- SELECT o.id, o.name, o.logo_id as logoId, o.description, o.image_id as imageId, o.principalType as type, p.website as website,
|
|
|
|
|
|
|
+ SELECT o.id, o.name, o.logo_id as logoId, o.description, o.image_id as imageId, o.principalType as type,
|
|
|
|
|
+ o.portailVisibility,
|
|
|
|
|
+ IF(p.website is not null AND p.website != '', p.website, CONCAT('https://', p.subDomain, '.opentalent.fr')) AS website,
|
|
|
CONCAT('[', GROUP_CONCAT(COLUMN_JSON(COLUMN_CREATE(
|
|
CONCAT('[', GROUP_CONCAT(COLUMN_JSON(COLUMN_CREATE(
|
|
|
'type', oa.type, 'latitude', a.latitude, 'longitude', a.longitude,
|
|
'type', oa.type, 'latitude', a.latitude, 'longitude', a.longitude,
|
|
|
'streetAddress', TRIM(BOTH '\n' FROM CONCAT_WS('\n', a.streetAddress, a.streetAddressSecond, a.streetAddressThird)),
|
|
'streetAddress', TRIM(BOTH '\n' FROM CONCAT_WS('\n', a.streetAddress, a.streetAddressSecond, a.streetAddressThird)),
|