Explorar el Código

add portail visibility

Vincent hace 1 año
padre
commit
dc71ab4e90
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      sql/schema-extensions/002-view_federation_structures.sql

+ 3 - 1
sql/schema-extensions/002-view_federation_structures.sql

@@ -1,6 +1,8 @@
 CREATE OR REPLACE VIEW view_federation_structures
 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(
                    'type', oa.type, 'latitude', a.latitude, 'longitude', a.longitude,
                    'streetAddress', TRIM(BOTH '\n' FROM CONCAT_WS('\n', a.streetAddress, a.streetAddressSecond, a.streetAddressThird)),