# flbResourceAvailability

Umožní uživateli vybrat datumový interval a zobrazit zdroje dostupné v daném intervalu.&#x20;

**Volitelné parametry:**

* **tag**: Možnost omezit zdroje v kalendáři podle seznamu tagu. Zdroj musi mit alespon jeden tag. Tag je textový řetězec asociovaný ke zdroji. Tagy se kombinují pomocí logického operátoru OR.
* **center:** seznam ID středisek, ze kterých se mají zobrazit kalendáře zdrojů
* **withTime:** umožňuje vybrat jestli rozmezí zadávat datumem nebo datumem a časem. Možné hodnoty true/false (default: false)
* **filter:** definice filterů pro vyhledávání ve volných zdrojích
* **dependOn**: a **dependValue**:&#x20;
  * Jsou-li v konkrétním filtru použity parametry **dependOn** a **dependValue**, tak se tento filter zobrazuje jen v případě, že je uživatelem vybraná položka s tagem **dependValue** ve filtru s ID **dependOn**. Tímto způsobem je možné nadefinovat závislosti mezi filtry.

**Příklad 1:**

```
flbInit('https://www.flexbook.cz/ajax.php', 4, [ 
{ 
  type: 'flbResourceAvailability', 
  placeHolder: 'flexbook_resource_availability', 
  params: { 
    tag: ['chalupa'], 
  } 
}, 
]);
```

Ukázka použití experimentálního parametru pro definici filterů ve vyhledávání volných zdrojů.

```
      filter:[
              {
                id: 'level',
                label: 'Úroveň lyžování',
                type: 'select',
                firstItem: 'nerozhoduje',
                items: [
                  {
                    label: 'Amater',
                    tag: 'amater',
                  },
                 {
                  label: 'Profik',
                  tag: 'profik',
                 },
                ]
              },
              {
                id: 'vybaveni',
                label: 'Vybavení',
                type: 'select',
                firstItem: 'nerozhoduje',
                items: [
                  {
                    label: 'Lyže',
                    tag: 'sjezdove lyze',
                  },
                 {
                  label: 'Přilba',
                  tag: 'lyzarska prilba',
                 },
                ]
              },
              {
                id: 'vel-lyze',
                label: 'Velikost lyží',
                type: 'select',
                fixedTo: 'vybaveni',
                fixedValue: 'sjezdove lyze',
                firstItem: 'nerozhoduje',
                items: [
                  {
                    label: '160 cm',
                    tag: 'lyze-vel-160',
                  },
                 {
                  label: '170 cm',
                  tag: 'lyze-vel-170',
                 },
                ]
              }
        ],
```

Filtry se zobrazují sekvenčně za sebou tak jak jsou nadefinovány v JSON hodnotě parametru filter.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flexbook.gitbook.io/integracni-manual/javascript-komponenty/flbresourceavailability.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
