salix/front/core/mocks/crud-model.js

31 lines
581 B
JavaScript

module.exports = {
data: [],
filter: {},
order: {},
insert: () => {
return {
then: callback => {
callback({data: {id: 1234}});
}
};
},
remove: () => {
return {
then: callback => {
callback({data: {id: 1234}});
}
};
},
save: () => {
return {
then: callback => {
callback({data: {id: 1234}});
}
};
},
refresh: () => {},
addFilter: () => {},
applyFilter: () => {}
};