ywana-core8 0.0.568 → 0.0.569

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.568",
3
+ "version": "0.0.569",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -371,8 +371,13 @@ export const CollectionContext = (url, field, host, page, fetching) => {
371
371
  return {
372
372
 
373
373
  all: [],
374
+ filters: {},
374
375
  selected: null,
375
376
 
377
+ changeFilters(filters) {
378
+ this.filters = filters
379
+ },
380
+
376
381
  async load() {
377
382
  try {
378
383
  const data = await API.all(null, page);
@@ -33,9 +33,11 @@ export const TokenField = ({ id, label, tokens = [], readOnly, options, onChange
33
33
  event.preventDefault()
34
34
  event.stopPropagation()
35
35
  const token = event.target.value
36
- const next = Array.isArray(tokens) ? tokens.concat(token) : [token]
37
- if (onChange) onChange(id, next)
38
- setValue('')
36
+ if (token && token.length > 0) {
37
+ const next = Array.isArray(tokens) ? tokens.concat(token) : [token]
38
+ if (onChange) onChange(id, next)
39
+ setValue('')
40
+ }
39
41
  }
40
42
 
41
43
  if (value === '' && tokens.length > 0 && event.key === 'Backspace') {
@@ -93,13 +93,13 @@ export const Planner = ({ title, events = [], lanes = [], navigation = true, onS
93
93
  {navigation ? (
94
94
  <Header title={label}>
95
95
  &nbsp;&nbsp;
96
- <Button label="This Week" outlined action={showThisWeek}/>
96
+ <Button label="Esta Semana" outlined action={showThisWeek}/>
97
97
  <Icon icon="chevron_right" clickable action={next} />
98
- <TextField id="to" type="date" label="To" value={to} onChange={(id, value) => setTo(value)} />
98
+ <TextField id="to" type="date" label="Hasta" value={to} onChange={(id, value) => setTo(value)} />
99
99
  <div className="expand"></div>
100
- <DropDown id="ranges" label="Date Range" options={DATE_RANGE} value={dateRange} onChange={(id, value) => setDateRange(value)} />
100
+ <DropDown id="ranges" label="Rango" options={DATE_RANGE} value={dateRange} onChange={(id, value) => setDateRange(value)} />
101
101
  <div className="expand"></div>
102
- <TextField id="from" type="date" label="From" value={from} onChange={(id, value) => setFrom(value)} />
102
+ <TextField id="from" type="date" label="Desde" value={from} onChange={(id, value) => setFrom(value)} />
103
103
  <Icon icon="chevron_left" clickable action={prev} />
104
104
  </Header>
105
105
  ) : null}