update assets dependencies; still work to be done to solve it all

This commit is contained in:
bkfox
2022-03-10 15:47:56 +01:00
parent 4e03abcac8
commit ab8858154b
24 changed files with 6863 additions and 4776 deletions

View File

@ -1,4 +1,3 @@
import Vue from 'vue';
function getCookie(name) {
if(document.cookie && document.cookie !== '') {
@ -82,7 +81,7 @@ export default class Model {
*/
commit(data) {
this.id = this.constructor.getId(data);
Vue.set(this, 'data', data);
this.data = data;
}
/**
@ -123,12 +122,12 @@ export class Set {
/**
* Fetch multiple items from server
*/
static fetch(url, options=null, args=null) {
static fetch(model, url, options=null, args=null) {
options = this.getOptions(options)
return fetch(url, options)
.then(response => response.json())
.then(data => (data instanceof Array ? data : data.results)
.map(d => new this.model(d, {url: url, ...args})))
.map(d => new model(d, {url: url, ...args})))
}
/**