Skip to content
Snippets Groups Projects
Commit 73f067cf authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

/people -> /base/people

parent eadf65dc
No related branches found
No related tags found
No related merge requests found
Pipeline #58788 passed
...@@ -27,14 +27,14 @@ Or directly via CDN: ...@@ -27,14 +27,14 @@ Or directly via CDN:
- `entry-point-url` (optional, default is the TU Graz entry point url): entry point url to access the api - `entry-point-url` (optional, default is the TU Graz entry point url): entry point url to access the api
- example `<dbp-organization-select entry-point-url="http://127.0.0.1:8000"></dbp-organization-select>` - example `<dbp-organization-select entry-point-url="http://127.0.0.1:8000"></dbp-organization-select>`
- `value` (optional): api path of organization to preload the selector with - `value` (optional): api path of organization to preload the selector with
- example `<dbp-organization-select value="/people/testuser"></dbp-organization-select>` - example `<dbp-organization-select value="/base/people/testuser"></dbp-organization-select>`
- the `value` will also be set automatically when an organization is chosen in the selector - the `value` will also be set automatically when an organization is chosen in the selector
- `context` (optional): the context of the returned organizations - `context` (optional): the context of the returned organizations
- example `<dbp-organization-select context="libray-manager"></dbp-organization-select>` returns all organizations - example `<dbp-organization-select context="libray-manager"></dbp-organization-select>` returns all organizations
where the current user is library manager where the current user is library manager
- if no `context` is set all organizations are returned that are in a relation with the current user - if no `context` is set all organizations are returned that are in a relation with the current user
- `data-object` (read-only): when an organization is selected the organization object will be set as json string - `data-object` (read-only): when an organization is selected the organization object will be set as json string
- example `<dbp-organization-select data-object="{"@id":"/organizations/1190-F2050","@type":"http://schema.org/Organization","identifier":"1190-F2050","name":"Institut für Stahlbau","url":"https://online.tugraz.at/tug_online/wborg.display?pOrgNr=1190","alternateName":"F2050"}"></dbp-organization-select>` - example `<dbp-organization-select data-object="{"@id":"/organizations/1190-F2050","@type":"http://schema.org/Organization","identifier":"1190-F2050","name":"Institut für Stahlbau","url":"https://online.tugraz.at/tug_online/wborg.display?pOrgNr=1190","alternateName":"F2050"}"></dbp-organization-select>`
- `auth` object: you need to set that object property for the auth token - `auth` object: you need to set that object property for the auth token
- example auth property: `{token: "THE_BEARER_TOKEN"}` - example auth property: `{token: "THE_BEARER_TOKEN"}`
- note: most often this should be an attribute that is not set directly, but subscribed at a provider - note: most often this should be an attribute that is not set directly, but subscribed at a provider
......
...@@ -27,7 +27,7 @@ Or directly via CDN: ...@@ -27,7 +27,7 @@ Or directly via CDN:
- `entry-point-url` (optional, default is the TU Graz entry point url): entry point url to access the api - `entry-point-url` (optional, default is the TU Graz entry point url): entry point url to access the api
- example `<dbp-person-profile entry-point-url="http://127.0.0.1:8000"></dbp-person-profile>` - example `<dbp-person-profile entry-point-url="http://127.0.0.1:8000"></dbp-person-profile>`
- `value` (optional): api path of person to preload the selector with - `value` (optional): api path of person to preload the selector with
- example `<dbp-person-profile value="/people/testuser"></dbp-person-profile>` - example `<dbp-person-profile value="/base/people/testuser"></dbp-person-profile>`
- `auth` object: you need to set that object property for the auth token - `auth` object: you need to set that object property for the auth token
- example auth property: `{token: "THE_BEARER_TOKEN"}` - example auth property: `{token: "THE_BEARER_TOKEN"}`
- note: most often this should be an attribute that is not set directly, but subscribed at a provider - note: most often this should be an attribute that is not set directly, but subscribed at a provider
......
...@@ -46,7 +46,7 @@ export class PersonProfile extends DBPLitElement { ...@@ -46,7 +46,7 @@ export class PersonProfile extends DBPLitElement {
} }
case 'value': case 'value':
if (this.value !== '') { if (this.value !== '') {
const apiUrl = this.entryPointUrl + '/people/' + this.value; const apiUrl = this.entryPointUrl + '/base/people/' + this.value;
// load person // load person
fetch(apiUrl, { fetch(apiUrl, {
......
...@@ -27,10 +27,10 @@ Or directly via CDN: ...@@ -27,10 +27,10 @@ Or directly via CDN:
- `entry-point-url` (optional, default is the TU Graz entry point url): entry point url to access the api - `entry-point-url` (optional, default is the TU Graz entry point url): entry point url to access the api
- example `<dbp-person-select entry-point-url="http://127.0.0.1:8000"></dbp-person-select>` - example `<dbp-person-select entry-point-url="http://127.0.0.1:8000"></dbp-person-select>`
- `value` (optional): api path of person to preload the selector with - `value` (optional): api path of person to preload the selector with
- example `<dbp-person-select value="/people/testuser"></dbp-person-select>` - example `<dbp-person-select value="/base/people/testuser"></dbp-person-select>`
- the `value` will also be set automatically when a person is chosen in the selector - the `value` will also be set automatically when a person is chosen in the selector
- `data-object` (read-only): when a person is selected the person object will be set as json string - `data-object` (read-only): when a person is selected the person object will be set as json string
- example `<dbp-person-select data-object="{"@id":"/people/testuser", "@type":"http://schema.org/Person", "identifier":"testuser", "givenName":"Hans", "familyName":"Tester", "honorificSuffix":"Ing.", "telephone":"+43 (876) 123-4567", "phoneExtension":"4567", "email":"hans.tester@email.com", "name":"Hans Tester"}"></dbp-person-select>` - example `<dbp-person-select data-object="{"@id":"/base/people/testuser", "@type":"http://schema.org/Person", "identifier":"testuser", "givenName":"Hans", "familyName":"Tester", "honorificSuffix":"Ing.", "telephone":"+43 (876) 123-4567", "phoneExtension":"4567", "email":"hans.tester@email.com", "name":"Hans Tester"}"></dbp-person-select>`
- `show-details` (optional): also shows the email address of the persons to distinguish people with the same name - `show-details` (optional): also shows the email address of the persons to distinguish people with the same name
- the currently logged in user needs to have permissions to show the email address of people - the currently logged in user needs to have permissions to show the email address of people
- example `<dbp-person-select show-details></dbp-person-select>` - example `<dbp-person-select show-details></dbp-person-select>`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment