diff --git a/src/includes/head.pug b/src/includes/head.pug index 9643a940b1bfe72d9add9db5741d5c922c6d8ca7..11241e4f5f30f052061421a7afb0b58df97042ec 100644 --- a/src/includes/head.pug +++ b/src/includes/head.pug @@ -3,15 +3,18 @@ head meta(charset="utf-8") script(src="https://unpkg.com/@webcomponents/webcomponentsjs@1.2.7/webcomponents-loader.js") //- script(type="module" src="/scripts/sib-core/dist/index.js") - script(type="module" src="https://unpkg.com/@startinblox/core@0.9") + script(type="module" src="https://unpkg.com/@startinblox/core@0.9.27") script(type="module" src="https://unpkg.com/@startinblox/router@0.7") + //- script(type="module" src="/scripts/sib-auth/index.js") script(type="module" src="https://unpkg.com/@startinblox/oidc@0.8.4") script(type="module" src="https://unpkg.com/@startinblox/component-conversation@0.4") script(src="https://kit.fontawesome.com/48014d2af3.js") script(src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous") script(src="/scripts/coopstarter.js") script(async src="https://platform.twitter.com/widgets.js" charset="utf-8") + script(src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js" integrity="sha384-wF7Jc4ZlWVxe/L8Ji3hOIBeTgo/HwFuaeEfjGmS3EXAG7Y+7Kjjr91gJpJtr+PAT" crossorigin="anonymous") link(rel="stylesheet" href="/styles/index.css") + script(data-default-context type="application/ld+json" ). { diff --git a/src/includes/mentor/resources/detail.pug b/src/includes/mentor/resources/detail.pug index 875da38f7838468ca5567ccb412e43c1800f6a4d..3b41adca093ce474e28b03301c9c071f1fb9254d 100644 --- a/src/includes/mentor/resources/detail.pug +++ b/src/includes/mentor/resources/detail.pug @@ -7,14 +7,14 @@ sib-display#detail-mentor( content(preview_image, iframe_link),\ description, review.reviewer.account.picture, review.reviewer,\ copyright, specifications(\ - header_specifications, author, country, language.name,\ + header_specifications, author, country.name, language.name,\ publication_year, fields, sharing)', widget-submitter='cs-display-mentor-link', class-name="title_form" class-steps="steps" widget-author='cs-display-resource-property', - widget-country='cs-display-resource-property', + widget-country.name='cs-display-resource-property', widget-submitter.mentorProfile.organisation.name='cs-display-resource-property' class-submitter="resource-author" class-broken="broken" @@ -57,7 +57,7 @@ sib-display#detail-mentor( label-skills=`${data.WithThisResourceBeAbleTo}` label-uri=`${data.LinkToResource}` name-uri='original-link' - label-country=`${data.Country} : ` + label-country.name=`${data.Country} : ` label-submitter.mentorProfile.organisation.name=`${data.Organisation} : ` label-author=`${data.Author} : ` label-submitter=`${data.ResourcePostedBy}: ` diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 6fa6facf4b9f23b4c92831f64a08403cbfaf84b9..93d392a46081c152cce231815e07eb72f2bb2cec 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -403,6 +403,24 @@ function fillSenderLike(userWhoSubmitLike, formSenderLike, currentResource) { receiver_object_id } +/** + * Specific treatments for the request lists refresh + * @param {String} formId - Id of the sumitted form + * @param {String} listId - Id of the list to refresh + */ +async function refreshRequestList(formId, listId) { + let form = document.getElementById(formId); + form.addEventListener("save", async function() { + let list = document.getElementById(listId); + let listProxy = await list.component.resource + listProxy.clearCache(); + list.dataset.src = list.dataset.src; + setTimeout(() => { + manageAccordionForRequest(); + }, 1000); + }); +} + /** * For entrepreneur dashboard only : * As we cannot have multiple imbricated filtering with the native sib-display, we manage it manually. @@ -605,6 +623,8 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXX ON LOAD XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX*/ jQuery(document).ready(function($) { + Sentry.init({ dsn: 'https://a95ca890079d4602a2096a64ca56c9d3@o383270.ingest.sentry.io/5213278' }); + window.addEventListener('requestNavigation', function(e) { setTimeout(function() { let loader = document.getElementById('main-loader'); @@ -748,7 +768,7 @@ jQuery(document).ready(function($) { refreshList("mentor_profile_edition", "mentor_contact"); refreshList("mentor_profile_edition", "user_account_picture"); initFileUpload("mentor_profile_edition", "account.picture"); - refreshList("change_status_request", "request_list"); + refreshRequestList("change_status_request", "request_list"); addProperFilterToSearchComponents("entrepreneur-resource-list"); addProperFilterToSearchComponents("mentor-database"); diff --git a/src/scripts/dispatch-space-n-user.js b/src/scripts/dispatch-space-n-user.js index 4af132f5240fd03c8bd6b8d4730900c9170b6fa1..4ccb9829575d31416df48623b01de7325732cd8d 100644 --- a/src/scripts/dispatch-space-n-user.js +++ b/src/scripts/dispatch-space-n-user.js @@ -1,4 +1,4 @@ -import { store } from 'https://unpkg.com/@startinblox/core@0.9'; +import { store } from 'https://unpkg.com/@startinblox/core@0.9.27'; const sibAuth = document.querySelector('sib-auth'); const context = {