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

38 lines
725 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}});
}
};
},
on: () => {
return {
then: callback => {
callback({data: {id: 1234}});
}
};
},
refresh: () => {},
addFilter: () => {},
applyFilter: () => {},
};