|
|
@ -94,5 +94,66 @@ const VirtualActivityService = {
|
|
|
|
localStorage.removeItem(PERMISSION)
|
|
|
|
localStorage.removeItem(PERMISSION)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const Paginate = {
|
|
|
|
|
|
|
|
|
|
|
|
export { TokenService, UserService, PermissionService, VirtualActivityService, CategoryNameService }
|
|
|
|
get(SERVICE) {
|
|
|
|
|
|
|
|
if (localStorage.getItem(SERVICE)) {
|
|
|
|
|
|
|
|
let service = qs.parse(localStorage.getItem(SERVICE), { strictNullHandling: true });
|
|
|
|
|
|
|
|
if (typeof service.pagination !== 'undefined' && service.pagination) {
|
|
|
|
|
|
|
|
let pagination = {};
|
|
|
|
|
|
|
|
for(let key in service.pagination) {
|
|
|
|
|
|
|
|
pagination[key] = Number(service.pagination[key])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return pagination
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
save(SERVICE, pagination = null ) {
|
|
|
|
|
|
|
|
let service = null;
|
|
|
|
|
|
|
|
if (localStorage.getItem(SERVICE)) {
|
|
|
|
|
|
|
|
service = qs.parse(localStorage.getItem(SERVICE));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
service = {};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
service['pagination'] = pagination;
|
|
|
|
|
|
|
|
let service_paginate = qs.stringify(service);
|
|
|
|
|
|
|
|
localStorage.setItem(SERVICE, service_paginate)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
remove(SERVICE) {
|
|
|
|
|
|
|
|
this.save(SERVICE);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const Sort = {
|
|
|
|
|
|
|
|
get(SERVICE) {
|
|
|
|
|
|
|
|
if (localStorage.getItem(SERVICE)) {
|
|
|
|
|
|
|
|
let service = qs.parse(localStorage.getItem(SERVICE), { strictNullHandling: true });
|
|
|
|
|
|
|
|
if (typeof service.sort !== 'undefined' && service.sort) {
|
|
|
|
|
|
|
|
return service.sort
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
save(SERVICE, sort = '') {
|
|
|
|
|
|
|
|
let service = null;
|
|
|
|
|
|
|
|
if (localStorage.getItem(SERVICE)) {
|
|
|
|
|
|
|
|
service = qs.parse(localStorage.getItem(SERVICE));
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
service = {};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
service['sort'] = sort;
|
|
|
|
|
|
|
|
let service_sort = qs.stringify(service);
|
|
|
|
|
|
|
|
localStorage.setItem(SERVICE, service_sort)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
remove(SERVICE) {
|
|
|
|
|
|
|
|
this.save(SERVICE);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export { TokenService, UserService, PermissionService, VirtualActivityService, CategoryNameService, Paginate, Sort }
|
|
|
|