ywana-core8 0.0.40 → 0.0.44
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/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +7 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +7 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentEditor.js +0 -1
- package/src/domain/CreateContentDialog.js +0 -1
- package/src/domain/TablePage.js +9 -1
package/package.json
CHANGED
@@ -32,7 +32,6 @@ export const CreateContentDialog = ({ label, type, value = {}, filter, validator
|
|
32
32
|
}
|
33
33
|
|
34
34
|
function filterForm(field, content) {
|
35
|
-
console.log('------ filterForm------------', field.id, filter)
|
36
35
|
const visible = field.required === true || field.optional === true
|
37
36
|
return filter ? visible && filter(field, content) : visible
|
38
37
|
}
|
package/src/domain/TablePage.js
CHANGED
@@ -47,7 +47,7 @@ export const TablePage = (props) => {
|
|
47
47
|
setPageContext(Object.assign({}, pageContext))
|
48
48
|
}
|
49
49
|
//site.openDialog(<EditContentDialog label={`Crear ${name}`} type={schema} onOK={onOK} validator={validator} />);
|
50
|
-
site.openDialog(<CreateContentDialog label={`
|
50
|
+
site.openDialog(<CreateContentDialog label={`Crear ${name}`} type={schema} onOK={onOK} validator={validator} filter={formFilter}/>);
|
51
51
|
}
|
52
52
|
|
53
53
|
function change(next) {
|
@@ -129,7 +129,14 @@ const TableFilters = (props) => {
|
|
129
129
|
|
130
130
|
const filterSchema = useMemo(() => {
|
131
131
|
const filterSchema = Object.assign({}, schema)
|
132
|
+
|
133
|
+
for (var key in filterSchema) {
|
134
|
+
if (filterSchema[key].filter === false) delete filterSchema[key]
|
135
|
+
}
|
136
|
+
|
132
137
|
Object.values(filterSchema).forEach(field => field.section = null)
|
138
|
+
|
139
|
+
Object.keys
|
133
140
|
delete filterSchema.flows
|
134
141
|
return filterSchema
|
135
142
|
}, [schema])
|
@@ -145,6 +152,7 @@ const TableFilters = (props) => {
|
|
145
152
|
}
|
146
153
|
|
147
154
|
const content = new Content(filterSchema, form)
|
155
|
+
console.log(filterSchema, content)
|
148
156
|
return (
|
149
157
|
<Fragment>
|
150
158
|
<Header title={<Text>Filtros</Text>} >
|