implementovane ulozenie do backend presuvanie reportov v dashboad
This commit is contained in:
@ -20,7 +20,9 @@ export const backend = {
|
||||
}
|
||||
var form_data = new FormData();
|
||||
Object.keys(data).forEach(key => {
|
||||
form_data.append(key, data[key]);
|
||||
let val = data[key];
|
||||
if (typeof val == 'object') val = JSON.stringify(val);
|
||||
form_data.append(key, val);
|
||||
});
|
||||
xhttp.open('POST', this.endpont + '?action=' + method);
|
||||
//xhttp.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
|
||||
@ -53,7 +55,7 @@ export const backend = {
|
||||
|
||||
update(id, title, description, status, group, priority) {
|
||||
return this.callPromise('update', {
|
||||
id: id,
|
||||
report_id: id,
|
||||
title: title,
|
||||
description: description,
|
||||
status: status,
|
||||
@ -62,11 +64,11 @@ export const backend = {
|
||||
},
|
||||
|
||||
delete(id) {
|
||||
return this.callPromise('delete', {id: id});
|
||||
return this.callPromise('delete', {report_id: id});
|
||||
},
|
||||
|
||||
get(id) {
|
||||
return this.callPromise('get', {id: id});
|
||||
return this.callPromise('get', {report_id: id});
|
||||
},
|
||||
|
||||
getAll() {
|
||||
@ -77,4 +79,12 @@ export const backend = {
|
||||
return this.callPromise('getallgrouped', {});
|
||||
},
|
||||
|
||||
updateOrdnum(ordnums) {
|
||||
return this.callPromise('updateordnum', {ordnums: ordnums});
|
||||
},
|
||||
|
||||
updateStatus(id, status) {
|
||||
return this.callPromise('updatestatus', {report_id: id, status: status});
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user